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