[Haskell] Haskell implementation of infixr and infixl/priorities

Bernie Pope bjpop at cs.mu.OZ.AU
Mon Oct 25 03:57:14 EDT 2004


On Fri, Oct 22, 2004 at 06:20:41PM +0200, Peter Theissen wrote:
> Hi,
> 
> I want to implement the infixL and infixR feature to increase
> the readability of the code. I would be very glad if anyone
> can send me some information about the implementation of
> this feature of  the Haskell parser or where I can find
> something about it.

Here is a link to the code that I use in Buddha for handling
infix applications:

   http://www.cs.mu.oz.au/~bjpop/code/Infix.hs

It works with the Happy parser for Haskell that is distributed
in the libraries provided by most compilers. 

Comments in the file explain the algorithm.

If you want the latest version then download Buddha and grab the
file from there.

Cheers,
Bernie.


More information about the Haskell mailing list