[Haskell-cafe] Syntactic extensions

Bernard James POPE bjpop at cs.mu.OZ.AU
Thu Feb 5 11:08:21 EST 2004


> Hello,
> 
> I am using the haskell-src bundle to implement a preprocessor for some 
> syntactic extensions to haskell. This is all fine and well, but I find 
> myself also wanting the preprocessor to let through some already existing 
> extensions, namely:
> * implicit parameters
> * pattern guards
> * multi-parameter type classes with functional dependencies
> * possibly template haskell
> 
> The haskell-src bundle already has support for mptcs (without fundeps), and 
> pattern guards are rather straight-forward, but for the rest;
> Where can I find formal specifications of these extensions in terms of 
> added/changed syntax?

Perhaps you've already looked, but if not, one possible source is
the Happy grammar that GHC uses, in ghc/compiler/parser.y, 
or even the Hugs Yacc grammar, in src/parser.y

Its probably not exactly what you want though...

If you either find something or implement it yourself please let me know.

Cheers,
Bernie.


More information about the Haskell-Cafe mailing list