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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Class.D3

Synopsis

Documentation

class D3 d where Source #

Minimal complete definition

d3

Methods

d3 :: Prism' d () Source #

x3 :: d Source #

Instances
D3 () Source # 
Instance details

Defined in Data.Digit.Class.D3

Methods

d3 :: Prism' () () Source #

x3 :: () Source #

D3 DecDigit Source # 
Instance details

Defined in Data.Digit.Decimal

D3 HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

D3 HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

D3 HEXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.UpperCase

D3 OctDigit Source # 
Instance details

Defined in Data.Digit.Octal

parse3 :: (D3 d, CharParsing p) => p d Source #

>>> parse (parse3 <* eof) "test" "3" :: Either ParseError DecDigit
Right DecDigit3
>>> parse parse3 "test" "3xyz" :: Either ParseError DecDigit
Right DecDigit3
>>> isn't _Right (parse parse3 "test" "xyz" :: Either ParseError DecDigit)
True