Safe Haskell | None |
---|---|
Language | Haskell2010 |
Exposes subspecies types of Char. e.g. [a-z], [A-Z], and [0-9].
Synopsis
- dual :: Ord a => Map k a -> Map a k
- 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
- uppers :: Map UpperChar Char
- upperChar :: CodeParsing m => m UpperChar
- charToUpper :: Char -> Maybe UpperChar
- upperCharQ :: QuasiQuoter
- data LowerChar
- lowerToChar :: LowerChar -> Char
- lowers :: Map LowerChar Char
- lowerChar :: CodeParsing m => m LowerChar
- charToLower :: Char -> Maybe LowerChar
- lowerCharQ :: QuasiQuoter
- data DigitChar
- digitToChar :: DigitChar -> Char
- digits :: Map DigitChar Char
- digitChar :: CodeParsing m => m DigitChar
- charToDigit :: Char -> Maybe DigitChar
- digitCharQ :: QuasiQuoter
- data SneakChar
- unSneakChar :: SneakChar -> Char
- sneakChar :: CodeParsing m => m SneakChar
- charToSneak :: Char -> Maybe SneakChar
- sneakCharQ :: QuasiQuoter
- data SneakHeadChar
- unSneakHeadChar :: SneakHeadChar -> Char
- sneakHeadChar :: CodeParsing m => m SneakHeadChar
- charToSneakHead :: Char -> Maybe SneakHeadChar
- sneakHeadCharQ :: QuasiQuoter
Documentation
>>>
:set -XQuasiQuotes
data AlphaNumChar Source #
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
alphaToChar :: AlphaChar -> Char Source #
alphaChar :: CodeParsing m => m AlphaChar Source #
alphaCharQ :: QuasiQuoter Source #
Simular to lowerCharQ
and upperCharQ
.
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
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 Sneak
.
SneakUnderscore | _ |
SneakAlphaNum AlphaNumChar |
|
unSneakChar :: SneakChar -> Char Source #
sneakChar :: CodeParsing m => m SneakChar Source #
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
.
Instances
Eq SneakHeadChar Source # | |
Defined in Data.Char.Cases (==) :: SneakHeadChar -> SneakHeadChar -> Bool # (/=) :: SneakHeadChar -> SneakHeadChar -> Bool # | |
Show SneakHeadChar Source # | |
Defined in Data.Char.Cases showsPrec :: Int -> SneakHeadChar -> ShowS # show :: SneakHeadChar -> String # showList :: [SneakHeadChar] -> ShowS # |
unSneakHeadChar :: SneakHeadChar -> Char Source #
sneakHeadChar :: CodeParsing m => m SneakHeadChar Source #
charToSneakHead :: Char -> Maybe SneakHeadChar Source #
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