[Haskell-cafe] \Parsec\Token.hs

Bernard Pope bjpop at csse.unimelb.edu.au
Mon Nov 7 23:26:51 EST 2005

On Mon, 2005-11-07 at 21:32 -0500, Sara Kenedy wrote:
> Dear all,
> I run file Token.hs in
> hugs98\libraries\Text\ParserCombinator\Parsec\Token.hs, but it
> displays this error
> ERROR : 64 - Syntax error in data type definition (unexpected '.')
> Anyone know how to fix this? Thanks.

The problem is that module uses extended features which are not part of
Haskell 98. In particular, on line 64 (and many others), it uses an
explicit "forall a." in the type of a record constructor.

You can get hugs to load it with the flag "-98", that is:

   hugs -98 <whatever module you want>

This tells hugs to allow extended features which are not Haskell 98,
such as the one mentioned above.

If you later decide to use ghc or ghci then you will need to give it the
"-f glasgow-exts" flag.


More information about the Haskell-Cafe mailing list