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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.D5

Synopsis

Documentation

class D5 d where Source #

Minimal complete definition

d5

Methods

d5 :: Prism' d () Source #

x5 :: d Source #

parse5 :: (D5 d, CharParsing p) => p d Source #

>>> parse (parse5 <* eof) "test" "5" :: Either ParseError DecDigit
Right DecDigit5
>>> parse parse5 "test" "5xyz" :: Either ParseError DecDigit
Right DecDigit5
>>> isn't _Right (parse parse5 "test" "xyz" :: Either ParseError DecDigit)
True