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