我是 Haskell 的新手。我正在尝试编译我下载的这个 Haskell 文件,但它给了我一些错误。
No instance for (Text.Parsec.Prim.Stream s m Char)
arising from a use of 'letter' at Parse.lhs:649:26-31
Possible fix:
add an instance declaration for (Text.Parsec.Prim.Stream s m Char)
In the first argument of '(<|>)', namely 'letter'
In the expression: letter <|> oneOf "_"
In the definition of 'firstAllowed':
firstAllowed = letter <|> oneOf "_"
不确定这是否足够,但这是有错误的代码部分:
parseIdent = do { str <- indent
; return (makeIdent str)
} <?> "identifier"
where firstAllowed = oneOf "_" <|> letter