Skip to content
Snippets Groups Projects
Daniel Rogozin's avatar
Daniel Rogozin authored
Before this patch, referring to a data constructor in a term-level
context led to a scoping error:

    ghci> id Int
    <interactive>:1:4: error: Data constructor not in scope: Int

After this patch, the renamer falls back to the type namespace
and successfully finds the Int. It is then rejected in the type
checker with a more useful error message:

    <interactive>:1:4: error:
    Type constructor 'Int' used where a value identifier was expected

We also do this for type variables.
aa069ecc
History
Name Last commit Last update