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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.DF

Synopsis

Documentation

class DF d where Source #

Minimal complete definition

dF

Methods

dF :: Prism' d () Source #

xF :: d Source #

Instances

parseF :: (DF d, CharParsing p) => p d Source #

>>> parse (parseF <* eof) "test" "F" :: Either ParseError HEXDigit
Right HEXDigitF
>>> parse parseF "test" "Fxyz" :: Either ParseError HEXDigit
Right HEXDigitF
>>> isn't _Right (parse parseF "test" "xyz" :: Either ParseError HEXDigit)
True