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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Class.D4

Synopsis

Documentation

class D4 d where Source #

Minimal complete definition

d4

Methods

d4 :: Prism' d () Source #

x4 :: d Source #

Instances
D4 () Source # 
Instance details

Defined in Data.Digit.Class.D4

Methods

d4 :: Prism' () () Source #

x4 :: () Source #

D4 DecDigit Source # 
Instance details

Defined in Data.Digit.Decimal

D4 HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

D4 HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

D4 HEXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.UpperCase

D4 OctDigit Source # 
Instance details

Defined in Data.Digit.Octal

parse4 :: (D4 d, CharParsing p) => p d Source #

>>> parse (parse4 <* eof) "test" "4" :: Either ParseError DecDigit
Right DecDigit4
>>> parse parse4 "test" "4xyz" :: Either ParseError DecDigit
Right DecDigit4
>>> isn't _Right (parse parse4 "test" "xyz" :: Either ParseError DecDigit)
True