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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.DB

Synopsis

Documentation

class DB d where Source #

Minimal complete definition

dB

Methods

dB :: Prism' d () Source #

xB :: d Source #

Instances

parseB :: (DB d, CharParsing p) => p d Source #

>>> parse (parseB <* eof) "test" "B" :: Either ParseError HEXDigit
Right HEXDigitB
>>> parse parseB "test" "Bxyz" :: Either ParseError HEXDigit
Right HEXDigitB
>>> isn't _Right (parse parseB "test" "xyz" :: Either ParseError HEXDigit)
True