Ticket #11 (closed feature request: fixed)
Fixities aren't handled during parsing
|Reported by:||nibro||Owned by:||nibro|
|Priority:||critical||Milestone:||Full code support|
Description (last modified by nibro) (diff)
Currently, operator expressions are parsed as left-associative, and of the same fixity. It would be nice to have the parser able to return a syntax tree where the fixity is taken into account correctly.
There are several issues involved:
- Have the parser take a set of known fixities, and take them into account when parsing.
- Have the parser react to (possibly infix) fixity declarations in the module it is parsing.
- Possibly handle operators with unknown fixity in a different way - though the H98 report stipulates a default behavior, so I believe it would be best to follow that.
Neil Mitchell's HLint has code to massage the AST given a set of known fixities. I will use that as my starting point.