parsec-3 problem

Christian Maeder Christian.Maeder at dfki.de
Fri Feb 18 13:27:53 CET 2011


Hi,

the following code goes through parsec-2 (and parsec1) but is rejected
by parsec-3

 import Text.ParserCombinators.Parsec
 gqrrel = many1 (alphaNum <|> char '_')
 myparser = sepBy gqrrel (char ',')

The error message is:

    No instance for (parsec-3.1.1:Text.Parsec.Prim.Stream s m Char)
      arising from a use of `char' at P3.hs:3:25-32
    Possible fix:
      add an instance declaration for
      (parsec-3.1.1:Text.Parsec.Prim.Stream s m Char)
    In the second argument of `sepBy', namely `(char ',')'
    In the expression: sepBy gqrrel (char ',')
    In the definition of `myparser': myparser = sepBy gqrrel (char ',')

Please review your decision to put parsec-3 into the HP.

Cheers Christian



More information about the Libraries mailing list