Changes between Version 3 and Version 4 of FixityResolution


Ignore:
Timestamp:
Mar 7, 2007 2:07:18 PM (7 years ago)
Author:
simonmar@…
Comment:

add sample code for fixity resolution

Legend:

Unmodified
Added
Removed
Modified
  • FixityResolution

    v3 v4  
    3232 
    3333This 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). 
     34 
     35Sample code for resolving fixities is here: [attachment: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).  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.