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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Class.D0

Synopsis

Documentation

class D0 d where Source #

Minimal complete definition

d0

Methods

d0 :: Prism' d () Source #

x0 :: d Source #

Instances
D0 () Source # 
Instance details

Defined in Data.Digit.Class.D0

Methods

d0 :: Prism' () () Source #

x0 :: () Source #

D0 BinDigit Source # 
Instance details

Defined in Data.Digit.Binary

D0 DecDigit Source # 
Instance details

Defined in Data.Digit.Decimal

D0 HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

D0 HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

D0 HEXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.UpperCase

D0 OctDigit Source # 
Instance details

Defined in Data.Digit.Octal

parse0 :: (D0 d, CharParsing p) => p d Source #

>>> parse (parse0 <* eof) "test" "0" :: Either ParseError BinDigit
Right BinDigit0
>>> parse parse0 "test" "0xyz" :: Either ParseError BinDigit
Right BinDigit0
>>> isn't _Right (parse parse0 "test" "xyz" :: Either ParseError BinDigit)
True