开发者

many1 no longer works with Parsec 3.x

开发者 https://www.devze.com 2022-12-25 06:32 出处:网络
After updating to Parsec 3.1 from 2.x, code using many1, such as word = many1 letter fails 开发者_如何转开发with

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

精彩评论

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

关注公众号