| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Digit.D4
- class D4 d where
- parse4 :: (D4 d, CharParsing p) => p d
Documentation
Minimal complete definition
parse4 :: (D4 d, CharParsing p) => p d Source #
>>>parse (parse4 <* eof) "test" "4" :: Either ParseError DigitRight 4
>>>parse parse4 "test" "4xyz" :: Either ParseError DigitRight 4
>>>isn't _Right (parse parse4 "test" "xyz" :: Either ParseError Digit)True
\c -> c /= '4' ==> isn't _Right (parse parse4 "test" [c] :: Either ParseError Digit)