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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Class.D1

Synopsis

Documentation

class D1 d where Source #

Minimal complete definition

d1

Methods

d1 :: Prism' d () Source #

x1 :: d Source #

Instances
D1 () Source # 
Instance details

Defined in Data.Digit.Class.D1

Methods

d1 :: Prism' () () Source #

x1 :: () Source #

D1 BinDigit Source # 
Instance details

Defined in Data.Digit.Binary

D1 DecDigit Source # 
Instance details

Defined in Data.Digit.Decimal

D1 HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

D1 HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

D1 HEXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.UpperCase

D1 OctDigit Source # 
Instance details

Defined in Data.Digit.Octal

parse1 :: (D1 d, CharParsing p) => p d Source #

>>> parse (parse1 <* eof) "test" "1" :: Either ParseError BinDigit
Right BinDigit1
>>> parse parse1 "test" "1xyz" :: Either ParseError BinDigit
Right BinDigit1
>>> isn't _Right (parse parse1 "test" "xyz" :: Either ParseError BinDigit)
True