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)