character-cases-0.1.0.0: Exposes subspecies types of Char. And naming cases. e.g. meaning of [a-z], [A-Z], [0-9], PascalCase, camelCase, and sneak_case.

Safe HaskellNone
LanguageHaskell2010

Data.Char.Cases

Description

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

Synopsis

Documentation

>>> :set -XQuasiQuotes

dual :: Ord a => Map k a -> Map a k Source #

alphaNumCharQ :: QuasiQuoter Source #

Simular to alphaCharQ and digitCharQ.

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

data UpperChar Source #

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 

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 #

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_ 

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 

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 SneakChar Source #

a-zA-Z0-9_

Please see Sneak.

Instances
Eq SneakChar Source # 
Instance details

Defined in Data.Char.Cases

Show SneakChar Source # 
Instance details

Defined in Data.Char.Cases

sneakCharQ :: QuasiQuoter Source #

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

>>> [sneakCharQ|x|]
SneakAlphaNum (AlphaNumAlpha (AlphaLower X_))
>>> [sneakCharQ|X|]
SneakAlphaNum (AlphaNumAlpha (AlphaUpper X))
>>> [sneakCharQ|_|]
SneakUnderscore
>>> [sneakCharQ|9|]
SneakAlphaNum (AlphaNumDigit D9)

data SneakHeadChar Source #

a-zA-Z_

Please see Sneak.

sneakHeadCharQ :: QuasiQuoter Source #

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

>>> [sneakHeadCharQ|x|]
SneakHeadAlpha (AlphaLower X_)
>>> [sneakHeadCharQ|X|]
SneakHeadAlpha (AlphaUpper X)
>>> [sneakHeadCharQ|_|]
SneakHeadUnderscore