开发者

many1 no longer works with Parsec 3.x

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜