... | ... | @@ -41,3 +41,6 @@ Hence, I propose that we remove operator fixity resolution from the context-free |
|
|
|
|
|
|
|
|
This would also let us expand the current paultry set of 9 fixity levels to an arbitrary limit, if we so wished (but that introduces backwards compatibility issues).
|
|
|
|
|
|
|
|
|
Sample code for resolving fixities is here: [resolve.hs](/attachment/wiki/FixityResolution/resolve.hs)[](/raw-attachment/wiki/FixityResolution/resolve.hs). I believe this implements Haskell 98 fixity resolution, without prefix negation (prefix negation could be added, but we might not need to; see [NegativeSyntax](negative-syntax)). The core of the parser is 12 lines of code, with a few lines of datatype declarations and pretty-printing. Note that there is no upper limit on precedence levels, but there is a lower limit of zero. This code could serve as the basis for specifying fixity resolution in the Haskell' report. |