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.
Don't forget to add a space before LANGUAGE
.
Instead of turning off the monomorphism restriction, you can also write an explicit type annotation.
精彩评论