Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class DA d where
- parseA :: (DA d, CharParsing p) => p d
Documentation
parseA :: (DA d, CharParsing p) => p d Source #
>>>
parse (parseA <* eof) "test" "A" :: Either ParseError Digit
Right A
>>>
parse parseA "test" "Axyz" :: Either ParseError Digit
Right A
>>>
isn't _Right (parse parseA "test" "xyz" :: Either ParseError Digit)
True
\c -> c /= 'A' ==> isn't _Right (parse parseA "test" [c] :: Either ParseError Digit)