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