Changes between Version 12 and Version 13 of FixityResolution


Ignore:
Timestamp:
Jul 31, 2009 1:30:10 PM (6 years ago)
Author:
simonmar@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FixityResolution

    v12 v13  
    196196The following is an example implementation of fixity resolution for
    197197Haskell expressions.  The function @resolve@ takes a list consisting
    198 of alternating expressions and operators (an instance of the
    199 @infixexp@ non-terminal in the context-free grammar), and returns
     198of alternating expressions and operators; i.e. an instance of the
     199@infixexp@ non-terminal in the context-free grammar, and returns
    200200either @Just e@ where @e@ is the resolved expression, or @Nothing@ if
    201 the input does not represent a valid expression.
     201the input does not represent a valid expression.  In a compiler, of
     202course, it would be better to return more information about the
     203operators involved for the purposes of producing a useful error message,
     204but the @Maybe@ type will suffice to illustrate the algorithm here.
    202205
    203206{{{