digit-0.5.2: 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 Digit
Right F
>>> parse parseFf "test" "Fxyz" :: Either ParseError Digit
Right F
>>> parse (parseFf <* eof) "test" "f" :: Either ParseError Digit
Right f
>>> parse parseFf "test" "fxyz" :: Either ParseError Digit
Right f
>>> isn't _Right (parse parseFf "test" "xyz" :: Either ParseError Digit)
True
\c -> (c `notElem` "Ff") ==> isn't _Right (parse parseFf "test" [c] :: Either ParseError Digit)