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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.DFf

Synopsis

Documentation

type DFf a = (DF a, Df a) Source #

parseFf :: (DFf d, CharParsing p) => p d Source #

>>> parse (parseFf <* eof) "test" "F" :: Either ParseError HeXDigit
Right HeXDigitF
>>> parse parseFf "test" "Fxyz" :: Either ParseError HeXDigit
Right HeXDigitF
>>> parse (parseFf <* eof) "test" "f" :: Either ParseError HeXDigit
Right HeXDigitf
>>> parse parseFf "test" "fxyz" :: Either ParseError HeXDigit
Right HeXDigitf
>>> isn't _Right (parse parseFf "test" "xyz" :: Either ParseError HeXDigit)
True