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