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