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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Class.D9

Synopsis

Documentation

class D9 d where Source #

Minimal complete definition

d9

Methods

d9 :: Prism' d () Source #

x9 :: d Source #

Instances
D9 () Source # 
Instance details

Defined in Data.Digit.Class.D9

Methods

d9 :: Prism' () () Source #

x9 :: () Source #

D9 DecDigit Source # 
Instance details

Defined in Data.Digit.Decimal

D9 HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

D9 HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

D9 HEXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.UpperCase

parse9 :: (D9 d, CharParsing p) => p d Source #

>>> parse (parse9 <* eof) "test" "9" :: Either ParseError DecDigit
Right DecDigit9
>>> parse parse9 "test" "9xyz" :: Either ParseError DecDigit
Right DecDigit9
>>> isn't _Right (parse parse9 "test" "xyz" :: Either ParseError DecDigit)
True