Parsing Haskell, problems
Parsing Haskell is tricky:
- The layout rules require interaction bewtween the lexer and the parser.
- The precedence and associativity of infix operators is not easily
available.
- Infix declarations can be put wherever a type signature is allowed,
even after a use of the operator.
- Fixity follows the scope of a specific binding, so you have to
know which identifiers are in scope and where they
were originally defined.
- Determining the fixity of imported operators requires a
full-fledged implementation of the module system!