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