Lexer.x:66:3: error:
• Non type-variable argument in the constraint: MonadError [Char] m
(Use FlexibleContexts to permit this)
• When checking the inferred type
go :: forall (m :: * -> *).
MonadError [Char] m =>
AlexInput -> m [Token]
In an equation for ‘scanTokens’:
scanTokens str
= go ('\n', [], str)
where
go inp@(_, _bs, str)
= case alexScan inp 0 of {
AlexEOF -> return ...
AlexError _ -> throwError "Invalid lexeme."
AlexSkip inp' len -> go inp'
AlexToken inp' len act -> ... }
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
This is a workaround for: