Safe Haskell | None |
---|---|
Language | Haskell2010 |
Exposes subspecies types of Char. e.g. `[a-z]`, `[A-Z]`, and `[0-9]`.
Synopsis
- data AlphaNumChar
- alphaNumToChar :: AlphaNumChar -> Char
- alphaNumChar :: CodeParsing m => m AlphaNumChar
- charToAlphaNum :: Char -> Maybe AlphaNumChar
- alphaNumCharQ :: QuasiQuoter
- data AlphaChar
- alphaToChar :: AlphaChar -> Char
- charToAlpha :: Char -> Maybe AlphaChar
- alphaChar :: CodeParsing m => m AlphaChar
- alphaCharQ :: QuasiQuoter
- data UpperChar
- upperToChar :: UpperChar -> Char
- upperChar :: CodeParsing m => m UpperChar
- charToUpper :: Char -> Maybe UpperChar
- upperCharQ :: QuasiQuoter
- data LowerChar
- lowerToChar :: LowerChar -> Char
- lowerChar :: CodeParsing m => m LowerChar
- charToLower :: Char -> Maybe LowerChar
- lowerCharQ :: QuasiQuoter
- data DigitChar
- digitToChar :: DigitChar -> Char
- digitChar :: CodeParsing m => m DigitChar
- charToDigit :: Char -> Maybe DigitChar
- digitCharQ :: QuasiQuoter
- data SnakeChar
- snakeToChar :: SnakeChar -> Char
- snakeChar :: CodeParsing m => m SnakeChar
- charToSnake :: Char -> Maybe SnakeChar
- snakeCharQ :: QuasiQuoter
- data SnakeHeadChar
- snakeHeadToChar :: SnakeHeadChar -> Char
- snakeHeadChar :: CodeParsing m => m SnakeHeadChar
- charToSnakeHead :: Char -> Maybe SnakeHeadChar
- snakeHeadCharQ :: QuasiQuoter
- data UpperSnakeHeadChar
- upperSnakeHeadToChar :: UpperSnakeHeadChar -> Char
- upperSnakeHeadChar :: CodeParsing m => m UpperSnakeHeadChar
- charToUpperSnakeHead :: Char -> Maybe UpperSnakeHeadChar
- upperSnakeHeadCharQ :: QuasiQuoter
- data UpperSnakeChar
- upperSnakeToChar :: UpperSnakeChar -> Char
- upperSnakeChar :: CodeParsing m => m UpperSnakeChar
- charToUpperSnake :: Char -> Maybe UpperSnakeChar
- upperSnakeCharQ :: QuasiQuoter
Documentation
data AlphaNumChar Source #
'[A-Za-z0-9]'
Instances
Eq AlphaNumChar Source # | |
Defined in Data.Char.Cases (==) :: AlphaNumChar -> AlphaNumChar -> Bool # (/=) :: AlphaNumChar -> AlphaNumChar -> Bool # | |
Ord AlphaNumChar Source # | |
Defined in Data.Char.Cases compare :: AlphaNumChar -> AlphaNumChar -> Ordering # (<) :: AlphaNumChar -> AlphaNumChar -> Bool # (<=) :: AlphaNumChar -> AlphaNumChar -> Bool # (>) :: AlphaNumChar -> AlphaNumChar -> Bool # (>=) :: AlphaNumChar -> AlphaNumChar -> Bool # max :: AlphaNumChar -> AlphaNumChar -> AlphaNumChar # min :: AlphaNumChar -> AlphaNumChar -> AlphaNumChar # | |
Show AlphaNumChar Source # | |
Defined in Data.Char.Cases showsPrec :: Int -> AlphaNumChar -> ShowS # show :: AlphaNumChar -> String # showList :: [AlphaNumChar] -> ShowS # |
alphaNumToChar :: AlphaNumChar -> Char Source #
alphaNumChar :: CodeParsing m => m AlphaNumChar Source #
charToAlphaNum :: Char -> Maybe AlphaNumChar Source #
alphaNumCharQ :: QuasiQuoter Source #
Simular to alphaCharQ
and digitCharQ
.
>>>
[alphaNumCharQ|x|]
AlphaNumAlpha (AlphaLower X_)
>>>
[alphaNumCharQ|X|]
AlphaNumAlpha (AlphaUpper X)
>>>
[alphaNumCharQ|1|]
AlphaNumDigit D1
'[A-Za-z]'
alphaToChar :: AlphaChar -> Char Source #
alphaChar :: CodeParsing m => m AlphaChar Source #
alphaCharQ :: QuasiQuoter Source #
Simular to lowerCharQ
and upperCharQ
.
'[A-Z]'
upperToChar :: UpperChar -> Char Source #
upperChar :: CodeParsing m => m UpperChar Source #
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
'[a-z]'
lowerToChar :: LowerChar -> Char Source #
lowerChar :: CodeParsing m => m LowerChar Source #
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_
'[0-9]'
digitToChar :: DigitChar -> Char Source #
digitChar :: CodeParsing m => m DigitChar Source #
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
'[a-zA-Z0-9_]'
Please see Snake
.
SnakeUnderscore | _ |
SnakeAlphaNum AlphaNumChar |
|
snakeToChar :: SnakeChar -> Char Source #
snakeChar :: CodeParsing m => m SnakeChar Source #
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
Eq SnakeHeadChar Source # | |
Defined in Data.Char.Cases (==) :: SnakeHeadChar -> SnakeHeadChar -> Bool # (/=) :: SnakeHeadChar -> SnakeHeadChar -> Bool # | |
Show SnakeHeadChar Source # | |
Defined in Data.Char.Cases showsPrec :: Int -> SnakeHeadChar -> ShowS # show :: SnakeHeadChar -> String # showList :: [SnakeHeadChar] -> ShowS # |
snakeHeadToChar :: SnakeHeadChar -> Char Source #
snakeHeadChar :: CodeParsing m => m SnakeHeadChar Source #
charToSnakeHead :: Char -> Maybe SnakeHeadChar Source #
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
data UpperSnakeHeadChar Source #
'[A-Z_]'
Please sese UpperSnake
.
Instances
Eq UpperSnakeHeadChar Source # | |
Defined in Data.Char.Cases (==) :: UpperSnakeHeadChar -> UpperSnakeHeadChar -> Bool # (/=) :: UpperSnakeHeadChar -> UpperSnakeHeadChar -> Bool # | |
Show UpperSnakeHeadChar Source # | |
Defined in Data.Char.Cases showsPrec :: Int -> UpperSnakeHeadChar -> ShowS # show :: UpperSnakeHeadChar -> String # showList :: [UpperSnakeHeadChar] -> ShowS # |
upperSnakeHeadChar :: CodeParsing m => m UpperSnakeHeadChar Source #
upperSnakeHeadCharQ :: QuasiQuoter Source #
>>>
[upperSnakeHeadCharQ|_|]
UpperSnakeHeadUnderscore
>>>
[upperSnakeHeadCharQ|A|]
UpperSnakeHeadUpper A
data UpperSnakeChar Source #
'[A-Z0-9_]'
Please see UpperSnake
.
Instances
Eq UpperSnakeChar Source # | |
Defined in Data.Char.Cases (==) :: UpperSnakeChar -> UpperSnakeChar -> Bool # (/=) :: UpperSnakeChar -> UpperSnakeChar -> Bool # | |
Show UpperSnakeChar Source # | |
Defined in Data.Char.Cases showsPrec :: Int -> UpperSnakeChar -> ShowS # show :: UpperSnakeChar -> String # showList :: [UpperSnakeChar] -> ShowS # |
upperSnakeChar :: CodeParsing m => m UpperSnakeChar Source #
upperSnakeCharQ :: QuasiQuoter Source #
>>>
[upperSnakeCharQ|_|]
UpperSnakeUnderscore
>>>
[upperSnakeCharQ|A|]
UpperSnakeUpper A
>>>
[upperSnakeCharQ|0|]
UpperSnakeDigit D0