Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从 2.x 更新到 Parsec 3.1 后,使用 many1 的代码,例如word = many1 letter失败
word = many1 letter
No instance for (Stream s m Char) arising from a use of `letter'
我发现一个邮件列表帖子声称添加{-#LANGUAGE NoMonomorphismRestriction #-}到源文件的顶部可以解决问题,但它没有。
{-#LANGUAGE NoMonomorphismRestriction #-}
别忘了在前面加一个空格LANGUAGE。
LANGUAGE
除了关闭单态限制之外,您还可以编写显式类型注释。