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