Grammar for (Glasgow) Haskell

Colin Paul Adams colin at
Sun Nov 23 11:22:58 EST 2008

Is this available as a happy file (or something similar)?

I tried searching the 6.10.1 source package for *.y, but the three files
I found don't seem to be what I'm looking for.

What I want to try to do is to generate C wrappers to call
GHC-compiled code by parsing 

foreign export 

declarations. But I figure just searching the code for a regular
expression on the lines of foreign[ ]+export is going to be
over-simplistic. But I'd rather not type in all the Haskell grammar
myself (I'm lazy - you wouldn't expect any other sort of person on
this list, I assume :-) ).
Colin Adams
Preston Lancashire

More information about the Glasgow-haskell-users mailing list