tags:

views:

127

answers:

1

After updating to Parsec 3.1 from 2.x, code using many1, such as word = many1 letter fails with

No instance for (Stream s m Char) arising from a use of `letter'

I found a mailing list post claiming that adding {-#LANGUAGE NoMonomorphismRestriction #-} to the top of the source file would solve the problem, but it did not.

+6  A: 

Don't forget to add a space before LANGUAGE.

Instead of turning off the monomorphism restriction, you can also write an explicit type annotation.

Martijn