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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Class.MixedCase

Contents

Synopsis

Types

type DAa a = (DA a, Da a) Source #

type DBb a = (DB a, Db a) Source #

type DCc a = (DC a, Dc a) Source #

type DDd a = (DD a, Dd a) Source #

type DEe a = (DE a, De a) Source #

type DFf a = (DF a, Df a) Source #

Parsers

parseAa :: (DAa d, CharParsing p) => p d Source #

>>> parse (parseAa <* eof) "test" "A" :: Either ParseError HeXDigit
Right HeXDigitA
>>> parse parseAa "test" "Axyz" :: Either ParseError HeXDigit
Right HeXDigitA
>>> parse (parseAa <* eof) "test" "a" :: Either ParseError HeXDigit
Right HeXDigita
>>> parse parseAa "test" "axyz" :: Either ParseError HeXDigit
Right HeXDigita
>>> isn't _Right (parse parseAa "test" "xyz" :: Either ParseError HeXDigit)
True

parseBb :: (DBb d, CharParsing p) => p d Source #

>>> parse (parseBb <* eof) "test" "B" :: Either ParseError HeXDigit
Right HeXDigitB
>>> parse parseBb "test" "Bxyz" :: Either ParseError HeXDigit
Right HeXDigitB
>>> parse (parseBb <* eof) "test" "b" :: Either ParseError HeXDigit
Right HeXDigitb
>>> parse parseBb "test" "bxyz" :: Either ParseError HeXDigit
Right HeXDigitb
>>> isn't _Right (parse parseBb "test" "xyz" :: Either ParseError HeXDigit)
True

parseCc :: (DCc d, CharParsing p) => p d Source #

>>> parse (parseCc <* eof) "test" "C" :: Either ParseError HeXDigit
Right HeXDigitC
>>> parse parseCc "test" "Cxyz" :: Either ParseError HeXDigit
Right HeXDigitC
>>> parse (parseCc <* eof) "test" "c" :: Either ParseError HeXDigit
Right HeXDigitc
>>> parse parseCc "test" "cxyz" :: Either ParseError HeXDigit
Right HeXDigitc
>>> isn't _Right (parse parseCc "test" "xyz" :: Either ParseError HeXDigit)
True

parseDd :: (DDd d, CharParsing p) => p d Source #

>>> parse (parseDd <* eof) "test" "D" :: Either ParseError HeXDigit
Right HeXDigitD
>>> parse parseDd "test" "Dxyz" :: Either ParseError HeXDigit
Right HeXDigitD
>>> parse (parseDd <* eof) "test" "d" :: Either ParseError HeXDigit
Right HeXDigitd
>>> parse parseDd "test" "dxyz" :: Either ParseError HeXDigit
Right HeXDigitd
>>> isn't _Right (parse parseDd "test" "xyz" :: Either ParseError HeXDigit)
True

parseEe :: (DEe d, CharParsing p) => p d Source #

>>> parse (parseEe <* eof) "test" "E" :: Either ParseError HeXDigit
Right HeXDigitE
>>> parse parseEe "test" "Exyz" :: Either ParseError HeXDigit
Right HeXDigitE
>>> parse (parseEe <* eof) "test" "e" :: Either ParseError HeXDigit
Right HeXDigite
>>> parse parseEe "test" "exyz" :: Either ParseError HeXDigit
Right HeXDigite
>>> isn't _Right (parse parseEe "test" "xyz" :: Either ParseError HeXDigit)
True

parseFf :: (DFf d, CharParsing p) => p d Source #

>>> parse (parseFf <* eof) "test" "F" :: Either ParseError HeXDigit
Right HeXDigitF
>>> parse parseFf "test" "Fxyz" :: Either ParseError HeXDigit
Right HeXDigitF
>>> parse (parseFf <* eof) "test" "f" :: Either ParseError HeXDigit
Right HeXDigitf
>>> parse parseFf "test" "fxyz" :: Either ParseError HeXDigit
Right HeXDigitf
>>> isn't _Right (parse parseFf "test" "xyz" :: Either ParseError HeXDigit)
True

Re-exports