[Haskell-cafe] Parsec is being weird at me

Albert Y. C. Lai trebla at vex.net
Sat Aug 25 15:02:32 EDT 2007


Andrew Coppin wrote:
> Prelude> :m Text.ParserCombinators.Parsec
> Prelude Text.ParserCombinators.Parsec> parseTest (endBy anyToken (char 
> '#')) "abc#"
> Loading package parsec-2.0 ... linking ... done.
> parse error at (line 1, column 1):
> unexpected "b"
> expecting "#"

I read the doc and determined that it is perfectly correct behaviour.

Hint: anyToken becomes anyChar because your input is [Char].


More information about the Haskell-Cafe mailing list