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