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