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