Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
parseAa :: (DAa d, CharParsing p) => p d Source #
>>>
parse (parseAa <* eof) "test" "A" :: Either ParseError Digit
Right A
>>>
parse parseAa "test" "Axyz" :: Either ParseError Digit
Right A
>>>
parse (parseAa <* eof) "test" "a" :: Either ParseError Digit
Right a
>>>
parse parseAa "test" "axyz" :: Either ParseError Digit
Right a
>>>
isn't _Right (parse parseAa "test" "xyz" :: Either ParseError Digit)
True
\c -> (c `notElem` "Aa") ==> isn't _Right (parse parseAa "test" [c] :: Either ParseError Digit)