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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.DEe

Synopsis

Documentation

type DEe a = (DE a, De a) Source #

parseEe :: (DEe d, CharParsing p) => p d Source #

>>> parse (parseEe <* eof) "test" "E" :: Either ParseError HeXDigit
Right HeXDigitE
>>> parse parseEe "test" "Exyz" :: Either ParseError HeXDigit
Right HeXDigitE
>>> parse (parseEe <* eof) "test" "e" :: Either ParseError HeXDigit
Right HeXDigite
>>> parse parseEe "test" "exyz" :: Either ParseError HeXDigit
Right HeXDigite
>>> isn't _Right (parse parseEe "test" "xyz" :: Either ParseError HeXDigit)
True