Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
parseCc :: (DCc d, CharParsing p) => p d Source #
>>>
parse (parseCc <* eof) "test" "C" :: Either ParseError Digit
Right C
>>>
parse parseCc "test" "Cxyz" :: Either ParseError Digit
Right C
>>>
parse (parseCc <* eof) "test" "c" :: Either ParseError Digit
Right c
>>>
parse parseCc "test" "cxyz" :: Either ParseError Digit
Right c
>>>
isn't _Right (parse parseCc "test" "xyz" :: Either ParseError Digit)
True
\c -> (c `notElem` "Cc") ==> isn't _Right (parse parseCc "test" [c] :: Either ParseError Digit)