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