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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.DE

Synopsis

Documentation

class DE d where Source #

Minimal complete definition

dE

Methods

dE :: Prism' d () Source #

xE :: d Source #

Instances

parseE :: (DE d, CharParsing p) => p d Source #

>>> parse (parseE <* eof) "test" "E" :: Either ParseError HEXDigit
Right HEXDigitE
>>> parse parseE "test" "Exyz" :: Either ParseError HEXDigit
Right HEXDigitE
>>> isn't _Right (parse parseE "test" "xyz" :: Either ParseError HEXDigit)
True