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