Skip to content

Commit

Permalink
Fix location for aliases (#2536)
Browse files Browse the repository at this point in the history
- Closes #2531
  • Loading branch information
jonaprieto authored Nov 24, 2023
1 parent f610518 commit 78bacaa
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,12 @@ reserveInductiveSymbol d = reserveSymbolSignatureOf SKNameInductive d (d ^. indu

reserveAliasSymbol ::
(Members '[Error ScoperError, NameIdGen, State ScoperSyntax, State Scope, Reader BindingStrategy, InfoTableBuilder, State ScoperState] r) =>
Symbol ->
AliasDef 'Parsed ->
Sem r S.Symbol
reserveAliasSymbol = reserveSymbolOf SKNameAlias Nothing
reserveAliasSymbol a = do
s <- reserveSymbolOf SKNameAlias Nothing (a ^. aliasDefName)
let locAliasDef = getLoc a
return (set S.nameDefined locAliasDef s)

reserveProjectionSymbol ::
(Members '[Error ScoperError, NameIdGen, State ScoperSyntax, State Scope, Reader BindingStrategy, InfoTableBuilder, State ScoperState] r) =>
Expand Down Expand Up @@ -2480,7 +2483,7 @@ reserveAliasDef ::
(Members '[Error ScoperError, Reader ScopeParameters, State Scope, State ScoperState, InfoTableBuilder, NameIdGen, State ScoperSyntax, Reader BindingStrategy] r) =>
AliasDef 'Parsed ->
Sem r ()
reserveAliasDef = void . reserveAliasSymbol . (^. aliasDefName)
reserveAliasDef = void . reserveAliasSymbol

resolveSyntaxDef ::
(Members '[Error ScoperError, Reader ScopeParameters, State Scope, State ScoperState, InfoTableBuilder, NameIdGen, State ScoperSyntax, Reader BindingStrategy] r) =>
Expand Down

0 comments on commit 78bacaa

Please sign in to comment.