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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Dc

Synopsis

Documentation

class Dc d where Source #

Minimal complete definition

dc

Methods

dc :: Prism' d () Source #

xc :: d Source #

Instances

parsec :: (Dc d, CharParsing p) => p d Source #

>>> parse (parsec <* eof) "test" "c" :: Either ParseError HexDigit
Right HexDigitc
>>> parse parsec "test" "cxyz" :: Either ParseError HexDigit
Right HexDigitc
>>> isn't _Right (parse parsec "test" "xyz" :: Either ParseError HexDigit)
True