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

Safe HaskellNone
LanguageHaskell2010

Data.Digit.Class.LowerCase

Contents

Synopsis

Classes

class Da d where Source #

Minimal complete definition

da

Methods

da :: Prism' d () Source #

xa :: d Source #

Instances
Da () Source # 
Instance details

Defined in Data.Digit.Class.LowerCase

Methods

da :: Prism' () () Source #

xa :: () Source #

Da HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

Da HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

class Db d where Source #

Minimal complete definition

db

Methods

db :: Prism' d () Source #

xb :: d Source #

Instances
Db () Source # 
Instance details

Defined in Data.Digit.Class.LowerCase

Methods

db :: Prism' () () Source #

xb :: () Source #

Db HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

Db HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

class Dc d where Source #

Minimal complete definition

dc

Methods

dc :: Prism' d () Source #

xc :: d Source #

Instances
Dc () Source # 
Instance details

Defined in Data.Digit.Class.LowerCase

Methods

dc :: Prism' () () Source #

xc :: () Source #

Dc HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

Dc HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

class Dd d where Source #

Minimal complete definition

dd

Methods

dd :: Prism' d () Source #

xd :: d Source #

Instances
Dd () Source # 
Instance details

Defined in Data.Digit.Class.LowerCase

Methods

dd :: Prism' () () Source #

xd :: () Source #

Dd HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

Dd HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

class De d where Source #

Minimal complete definition

de

Methods

de :: Prism' d () Source #

xe :: d Source #

Instances
De () Source # 
Instance details

Defined in Data.Digit.Class.LowerCase

Methods

de :: Prism' () () Source #

xe :: () Source #

De HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

De HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

class Df d where Source #

Minimal complete definition

df

Methods

df :: Prism' d () Source #

xf :: d Source #

Instances
Df () Source # 
Instance details

Defined in Data.Digit.Class.LowerCase

Methods

df :: Prism' () () Source #

xf :: () Source #

Df HexDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.LowerCase

Df HeXDigit Source # 
Instance details

Defined in Data.Digit.Hexadecimal.MixedCase

Parsers

parsea :: (Da d, CharParsing p) => p d Source #

>>> parse (parsea <* eof) "test" "a" :: Either ParseError HexDigit
Right HexDigita
>>> parse parsea "test" "axyz" :: Either ParseError HexDigit
Right HexDigita
>>> isn't _Right (parse parsea "test" "xyz" :: Either ParseError HexDigit)
True

parseb :: (Db d, CharParsing p) => p d Source #

>>> parse (parseb <* eof) "test" "b" :: Either ParseError HexDigit
Right HexDigitb
>>> parse parseb "test" "bxyz" :: Either ParseError HexDigit
Right HexDigitb
>>> isn't _Right (parse parseb "test" "xyz" :: Either ParseError HexDigit)
True

parsec :: (Dc d, CharParsing p) => p d Source #

>>> parse (parsec <* eof) "test" "c" :: Either ParseError HexDigit
Right HexDigitc
>>> parse parsec "test" "cxyz" :: Either ParseError HexDigit
Right HexDigitc
>>> isn't _Right (parse parsec "test" "xyz" :: Either ParseError HexDigit)
True

parsed :: (Dd d, CharParsing p) => p d Source #

>>> parse (parsed <* eof) "test" "d" :: Either ParseError HexDigit
Right HexDigitd
>>> parse parsed "test" "dxyz" :: Either ParseError HexDigit
Right HexDigitd
>>> isn't _Right (parse parsed "test" "xyz" :: Either ParseError HexDigit)
True

parsee :: (De d, CharParsing p) => p d Source #

>>> parse (parsee <* eof) "test" "e" :: Either ParseError HexDigit
Right HexDigite
>>> parse parsee "test" "exyz" :: Either ParseError HexDigit
Right HexDigite
>>> isn't _Right (parse parsee "test" "xyz" :: Either ParseError HexDigit)
True

parsef :: (Df d, CharParsing p) => p d Source #

>>> parse (parsef <* eof) "test" "f" :: Either ParseError HexDigit
Right HexDigitf
>>> parse parsef "test" "fxyz" :: Either ParseError HexDigit
Right HexDigitf
>>> isn't _Right (parse parsef "test" "xyz" :: Either ParseError HexDigit)
True