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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.D0

Synopsis

Documentation

class D0 d where Source #

Minimal complete definition

d0

Methods

d0 :: Prism' d () Source #

x0 :: d Source #

parse0 :: (D0 d, CharParsing p) => p d Source #

>>> parse (parse0 <* eof) "test" "0" :: Either ParseError BinDigit
Right BinDigit0
>>> parse parse0 "test" "0xyz" :: Either ParseError BinDigit
Right BinDigit0
>>> isn't _Right (parse parse0 "test" "xyz" :: Either ParseError BinDigit)
True