Megaparsec: No instance for (ErrorComponent Void) arising from a do statement

190 views Asked by At

I am trying to write a simple parser with megaparsec and have the following issue:

type MyParser = Parsec Void String

xxx :: MyParser Int
xxx  = do
    satisfy (`notElem` "!>")
    return 1

gbgc :: MyParser [Int]
gbgc  = many (yyy <|> xxx)

I get the error on line: satisfy .... That says:

No instance for (ErrorComponent Void) arising from a do statement In a stmt of a 'do' block: satisfy (notElem "!>")

0

There are 0 answers