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