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