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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.DA

Synopsis

Documentation

class DA d where Source #

Minimal complete definition

dA

Methods

dA :: Prism' d () Source #

xA :: d Source #

Instances

parseA :: (DA d, CharParsing p) => p d Source #

>>> parse (parseA <* eof) "test" "A" :: Either ParseError HEXDigit
Right HEXDigitA
>>> parse parseA "test" "Axyz" :: Either ParseError HEXDigit
Right HEXDigitA
>>> isn't _Right (parse parseA "test" "xyz" :: Either ParseError HEXDigit)
True