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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.DD

Synopsis

Documentation

class DD d where Source #

Minimal complete definition

dD

Methods

dD :: Prism' d () Source #

xD :: d Source #

Instances

parseD :: (DD d, CharParsing p) => p d Source #

>>> parse (parseD <* eof) "test" "D" :: Either ParseError HEXDigit
Right HEXDigitD
>>> parse parseD "test" "Dxyz" :: Either ParseError HEXDigit
Right HEXDigitD
>>> isn't _Right (parse parseD "test" "xyz" :: Either ParseError HEXDigit)
True