[Haskell-cafe] \Parsec\Token.hs

Stefan Holdermans stefan at cs.uu.nl
Tue Nov 8 02:43:03 EST 2005


Sara,

> 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.

Token.hs defines a data type TokenParser:

   data TokenParser st =
     = TokenParser{ ...
                  , lexeme :: forall a . CharParser st a ->  
CharParser st a
                  , ...
                  }

The forall construct here is not part of Haskell 98. Hence, you  
should interpret the file with extensions available. From the top of  
my head, you can enable extension by passing the -98 command line  
option to Hugs.

HTH,

Stefan



More information about the Haskell-Cafe mailing list