Skip to content

Resolving local function's type signatures #102

Description

@mvoidex

Trying to resolve this:

foo ∷ Int
foo = sq $ quux * 2 where
    sq ∷ Int → Int
    sq x = x * x

I get:

for foo — GlobalSymbol, it's ok:

Ident (Scoped (GlobalSymbol (Value {symbolModule = ModuleName () "HaskellNamesTest", symbolName = Ident () "foo"}) (Qual () (ModuleName () "HaskellNamesTest") (Ident () "foo"))) (SrcSpanInfo {srcInfoSpan = SrcSpan "HaskellNamesTest.hs" 9 1 9 4, srcInfoPoints = []})) "foo"

But for sq I get ScopeError (ENotInScope):

Ident (Scoped (ScopeError (ENotInScope (Qual (SrcSpanInfo {srcInfoSpan = SrcSpan "HaskellNamesTest.hs" 11 9 11 11, srcInfoPoints = []}) (ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan "HaskellNamesTest.hs" 11 9 11 11, srcInfoPoints = []}) "HaskellNamesTest") (Ident (SrcSpanInfo {srcInfoSpan = SrcSpan "HaskellNamesTest.hs" 11 9 11 11, srcInfoPoints = []}) "sq")))) (SrcSpanInfo {srcInfoSpan = SrcSpan "HaskellNamesTest.hs" 11 9 11 11, srcInfoPoints = []})) "sq"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions