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)