character-cases-0.1.0.6: Exposes subspecies types of Char. And naming cases.
Safe HaskellNone
LanguageHaskell2010

Data.Char.Cases

Description

Exposes subspecies types of Char. e.g. `[a-z]`, `[A-Z]`, and `[0-9]`.

Synopsis

Documentation

alphaNumCharQ :: QuasiQuoter Source #

Simular to alphaCharQ and digitCharQ.

>>> [alphaNumCharQ|x|]
AlphaNumAlpha (AlphaLower X_)
>>> [alphaNumCharQ|X|]
AlphaNumAlpha (AlphaUpper X)
>>> [alphaNumCharQ|1|]
AlphaNumDigit D1

data AlphaChar Source #

'[A-Za-z]'

Instances

Instances details
Eq AlphaChar Source # 
Instance details

Defined in Data.Char.Cases

Ord AlphaChar Source # 
Instance details

Defined in Data.Char.Cases

Show AlphaChar Source # 
Instance details

Defined in Data.Char.Cases

data UpperChar Source #

'[A-Z]'

Constructors

A 
B 
C 
D 
E 
F 
G 
H 
I 
J 
K 
L 
M 
N 
O 
P 
Q 
R 
S 
T 
U 
V 
W 
X 
Y 
Z 

Instances

Instances details
Eq UpperChar Source # 
Instance details

Defined in Data.Char.Cases

Ord UpperChar Source # 
Instance details

Defined in Data.Char.Cases

Show UpperChar Source # 
Instance details

Defined in Data.Char.Cases

upperCharQ :: QuasiQuoter Source #

Extracts a Char of [A-Z]. Also throws compile error if non [A-Z] is passed.

>>> [upperCharQ|X|]
X
>>> [upperCharQ|Y|]
Y

data LowerChar Source #

'[a-z]'

Constructors

A_ 
B_ 
C_ 
D_ 
E_ 
F_ 
G_ 
H_ 
I_ 
J_ 
K_ 
L_ 
M_ 
N_ 
O_ 
P_ 
Q_ 
R_ 
S_ 
T_ 
U_ 
V_ 
W_ 
X_ 
Y_ 
Z_ 

Instances

Instances details
Eq LowerChar Source # 
Instance details

Defined in Data.Char.Cases

Ord LowerChar Source # 
Instance details

Defined in Data.Char.Cases

Show LowerChar Source # 
Instance details

Defined in Data.Char.Cases

lowerCharQ :: QuasiQuoter Source #

Extracts a Char of [a-z]. Also throws compile error if non [a-z] is passed.

>>> [lowerCharQ|x|]
X_
>>> [lowerCharQ|y|]
Y_

data DigitChar Source #

'[0-9]'

Constructors

D0 
D1 
D2 
D3 
D4 
D5 
D6 
D7 
D8 
D9 

Instances

Instances details
Eq DigitChar Source # 
Instance details

Defined in Data.Char.Cases

Ord DigitChar Source # 
Instance details

Defined in Data.Char.Cases

Show DigitChar Source # 
Instance details

Defined in Data.Char.Cases

digitCharQ :: QuasiQuoter Source #

Extracts a Char of [0-9]. Also throws compile error if non [a-z] is passed.

>>> [digitCharQ|0|]
D0
>>> [digitCharQ|9|]
D9

data SnakeChar Source #

'[a-zA-Z0-9_]'

Please see Snake.

Instances

Instances details
Eq SnakeChar Source # 
Instance details

Defined in Data.Char.Cases

Show SnakeChar Source # 
Instance details

Defined in Data.Char.Cases

snakeCharQ :: QuasiQuoter Source #

Extracts a Char of [a-zA-Z0-9_]. Also throws compile error if non [a-zA-Z0-9_] is passed.

>>> [snakeCharQ|x|]
SnakeAlphaNum (AlphaNumAlpha (AlphaLower X_))
>>> [snakeCharQ|X|]
SnakeAlphaNum (AlphaNumAlpha (AlphaUpper X))
>>> [snakeCharQ|_|]
SnakeUnderscore
>>> [snakeCharQ|9|]
SnakeAlphaNum (AlphaNumDigit D9)

data SnakeHeadChar Source #

'[a-zA-Z_]'

Please see Snake.

Instances

Instances details
Eq SnakeHeadChar Source # 
Instance details

Defined in Data.Char.Cases

Show SnakeHeadChar Source # 
Instance details

Defined in Data.Char.Cases

snakeHeadCharQ :: QuasiQuoter Source #

Extracts a Char of [a-zA-Z_]. Also throws compile error if non [a-zA-Z_] is passed.

>>> [snakeHeadCharQ|x|]
SnakeHeadAlpha (AlphaLower X_)
>>> [snakeHeadCharQ|X|]
SnakeHeadAlpha (AlphaUpper X)
>>> [snakeHeadCharQ|_|]
SnakeHeadUnderscore

upperSnakeHeadCharQ :: QuasiQuoter Source #

>>> [upperSnakeHeadCharQ|_|]
UpperSnakeHeadUnderscore
>>> [upperSnakeHeadCharQ|A|]
UpperSnakeHeadUpper A

upperSnakeCharQ :: QuasiQuoter Source #

>>> [upperSnakeCharQ|_|]
UpperSnakeUnderscore
>>> [upperSnakeCharQ|A|]
UpperSnakeUpper A
>>> [upperSnakeCharQ|0|]
UpperSnakeDigit D0