I am trying to reduce my confusion in Haskell syntax and would like to know what separate namespaces are in Haskell.
Namespaces means syntactic namespaces that correspond to the tables of various characters controlled by the compiler, and not the names of the areas defined in the code.
For instance:
- Value names (e.g. function names)
- Data constructors
- Type constructors
- Type parameters (in type definitions)
- instances?
- ...
I am interested because I have problems reading Haskell code (definitely more than with any other language), because I often find it difficult to understand exactly what I am looking for (especially with constructors / data types / statement type).
Haskell seems to be reusing several syntax constructs (esp. <name> <name> ...
) in many places and relies on context - it just turns out that the compiler is much better than me ...
source share