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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.D8

Synopsis

Documentation

class D8 d where Source #

Minimal complete definition

d8

Methods

d8 :: Prism' d () Source #

x8 :: d Source #

parse8 :: (D8 d, CharParsing p) => p d Source #

>>> parse (parse8 <* eof) "test" "8" :: Either ParseError DecDigit
Right DecDigit8
>>> parse parse8 "test" "8xyz" :: Either ParseError DecDigit
Right DecDigit8
>>> isn't _Right (parse parse8 "test" "xyz" :: Either ParseError DecDigit)
True