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