digit-0.4.0: 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 (HeXaDeCiMaLDigit' ())
Right (Left ())
>>> parse (parseEe <* eof) "test" "e" :: Either ParseError (HeXaDeCiMaLDigit' ())
Right (Left ())
>>> parse parseEe "test" "Exyz" :: Either ParseError (HeXaDeCiMaLDigit' ())
Right (Left ())
>>> parse parseEe "test" "exyz" :: Either ParseError (HeXaDeCiMaLDigit' ())
Right (Left ())
>>> isn't _Right (parse parseEe "test" "xyz" :: Either ParseError (HeXaDeCiMaLDigit' ()))
True
\c -> (c `notElem` "Ee") ==> isn't _Right (parse parseEe "test" [c] :: Either ParseError (HeXaDeCiMaLDigit' ()))