Closed
Description
[30 of 46] Compiling CLexer ( dist/build/CLexer.hs, dist/build/CLexer.o )
c2hs/c/CLexer.x:417:3: error:
• No instance for (Control.Monad.Fail.MonadFail P)
arising from a do statement
with the failable pattern ‘(c : cs)’
There are instances for similar types:
instance Control.Monad.Fail.MonadFail
Text.ParserCombinators.ReadP.P
-- Defined in ‘Text.ParserCombinators.ReadP’
• In a stmt of a 'do' block: (c : cs) <- getInput
In the expression:
do pos <- getPos
(c : cs) <- getInput
failP
pos
["Lexical error!",
"The character " ++ show c ++ " does not fit here."]
In an equation for ‘lexicalError’:
lexicalError
= do pos <- getPos
(c : cs) <- getInput
failP pos ["Lexical error!", ....]
|
417 | (c:cs) <- getInput
| ^^^^^^^^^^^^^^^^^^
Metadata
Metadata
Assignees
Labels
No labels