digit-0.6: A data-type representing digits 0-9 and other combinations

Safe HaskellNone
LanguageHaskell2010

Data.Digit.D7

Synopsis

Documentation

class D7 d where Source #

Minimal complete definition

d7

Methods

d7 :: Prism' d () Source #

x7 :: d Source #

parse7 :: (D7 d, CharParsing p) => p d Source #

>>> parse (parse7 <* eof) "test" "7" :: Either ParseError DecDigit
Right DecDigit7
>>> parse parse7 "test" "7xyz" :: Either ParseError DecDigit
Right DecDigit7
>>> isn't _Right (parse parse7 "test" "xyz" :: Either ParseError DecDigit)
True