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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Class.D8

Synopsis

Documentation

class D8 d where Source #

Minimal complete definition

d8

Methods

d8 :: Prism' d () Source #

x8 :: d Source #

Instances
D8 () Source # 
Instance details

Defined in Data.Digit.Class.D8

Methods

d8 :: Prism' () () Source #

x8 :: () Source #

D8 DecDigit Source # 
Instance details

Defined in Data.Digit.Decimal

D8 HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

D8 HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

D8 HEXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.UpperCase

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