| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Digit.Dc
- class Dc d where
- parsec :: (Dc d, CharParsing p) => p d
Documentation
Minimal complete definition
parsec :: (Dc d, CharParsing p) => p d Source #
>>>parse (parsec <* eof) "test" "c" :: Either ParseError DigitRight c
>>>parse parsec "test" "cxyz" :: Either ParseError DigitRight 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)