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