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