I’m trying to reduce my confusion about Haskell’s syntax and would like to find out what the separate namespaces are in Haskell.
Namespaces meaning syntactical namespaces corresponding to the various symbols tables the compiler manages, not name scopes defined in code.
For example:
- Value names (like function names)
- Data constructors
- Type constructors
- Type parameters (in type definitions)
- instances ?
- …?
I’m interested because I’m having trouble reading Haskell code (definitely more than with any other language) because I frequently have a hard time figuring out what exactly I’m looking at (especially with data/type constructors/type declarations).
Haskell seems to reuse a handful of syntactical constructs (esp. <name> <name> ...) in many places and relies on context – just turns out that the compiler is a lot better at this than me…
The Haskell Report §1.4 says