Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
RIO.Char
Description
Unicode Char
. Import as:
import qualified RIO.Char as C
This module does not export any partial functions. For those, see RIO.Char.Partial
Synopsis
- data Char
- isControl :: Char -> Bool
- isSpace :: Char -> Bool
- isLower :: Char -> Bool
- isUpper :: Char -> Bool
- isAlpha :: Char -> Bool
- isAlphaNum :: Char -> Bool
- isPrint :: Char -> Bool
- isDigit :: Char -> Bool
- isOctDigit :: Char -> Bool
- isHexDigit :: Char -> Bool
- isLetter :: Char -> Bool
- isMark :: Char -> Bool
- isNumber :: Char -> Bool
- isPunctuation :: Char -> Bool
- isSymbol :: Char -> Bool
- isSeparator :: Char -> Bool
- isAscii :: Char -> Bool
- isLatin1 :: Char -> Bool
- isAsciiUpper :: Char -> Bool
- isAsciiLower :: Char -> Bool
- data GeneralCategory
- = UppercaseLetter
- | LowercaseLetter
- | TitlecaseLetter
- | ModifierLetter
- | OtherLetter
- | NonSpacingMark
- | SpacingCombiningMark
- | EnclosingMark
- | DecimalNumber
- | LetterNumber
- | OtherNumber
- | ConnectorPunctuation
- | DashPunctuation
- | OpenPunctuation
- | ClosePunctuation
- | InitialQuote
- | FinalQuote
- | OtherPunctuation
- | MathSymbol
- | CurrencySymbol
- | ModifierSymbol
- | OtherSymbol
- | Space
- | LineSeparator
- | ParagraphSeparator
- | Control
- | Format
- | Surrogate
- | PrivateUse
- | NotAssigned
- generalCategory :: Char -> GeneralCategory
- toUpper :: Char -> Char
- toLower :: Char -> Char
- toTitle :: Char -> Char
- ord :: Char -> Int
- showLitChar :: Char -> ShowS
- lexLitChar :: ReadS String
- readLitChar :: ReadS Char
Documentation
Instances
Data Char | |||||
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char # dataTypeOf :: Char -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Char) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) # gmapT :: (forall b. Data b => b -> b) -> Char -> Char # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r # gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char # | |||||
Storable Char | |||||
Defined in Foreign.Storable | |||||
Bounded Char | |||||
Enum Char | |||||
Ix Char | |||||
Read Char | |||||
Show Char | |||||
IsChar Char | |||||
PrintfArg Char | |||||
Defined in Text.Printf | |||||
NFData Char | |||||
Defined in Control.DeepSeq | |||||
Eq Char | |||||
Ord Char | |||||
Hashable Char | |||||
Defined in Data.Hashable.Class | |||||
Prim Char | |||||
Defined in Data.Primitive.Types Methods sizeOfType# :: Proxy Char -> Int# alignmentOfType# :: Proxy Char -> Int# alignment# :: Char -> Int# indexByteArray# :: ByteArray# -> Int# -> Char readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Char #) writeByteArray# :: MutableByteArray# s -> Int# -> Char -> State# s -> State# s setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Char -> State# s -> State# s indexOffAddr# :: Addr# -> Int# -> Char readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Char #) writeOffAddr# :: Addr# -> Int# -> Char -> State# s -> State# s setOffAddr# :: Addr# -> Int# -> Int# -> Char -> State# s -> State# s | |||||
Display Char Source # | Since: 0.1.0.0 | ||||
Defined in RIO.Prelude.Display | |||||
Unbox Char | |||||
Defined in Data.Vector.Unboxed.Base | |||||
TestCoercion SChar | |||||
Defined in GHC.TypeLits Methods testCoercion :: forall (a :: Char) (b :: Char). SChar a -> SChar b -> Maybe (Coercion a b) | |||||
TestEquality SChar | |||||
Defined in GHC.TypeLits Methods testEquality :: forall (a :: Char) (b :: Char). SChar a -> SChar b -> Maybe (a :~: b) | |||||
Lift Char | |||||
Vector Vector Char | |||||
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: Mutable Vector s Char -> ST s (Vector Char) # basicUnsafeThaw :: Vector Char -> ST s (Mutable Vector s Char) # basicLength :: Vector Char -> Int # basicUnsafeSlice :: Int -> Int -> Vector Char -> Vector Char # basicUnsafeIndexM :: Vector Char -> Int -> Box Char # basicUnsafeCopy :: Mutable Vector s Char -> Vector Char -> ST s () # | |||||
MVector MVector Char | |||||
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Char -> Int basicUnsafeSlice :: Int -> Int -> MVector s Char -> MVector s Char basicOverlaps :: MVector s Char -> MVector s Char -> Bool basicUnsafeNew :: Int -> ST s (MVector s Char) basicInitialize :: MVector s Char -> ST s () basicUnsafeReplicate :: Int -> Char -> ST s (MVector s Char) basicUnsafeRead :: MVector s Char -> Int -> ST s Char basicUnsafeWrite :: MVector s Char -> Int -> Char -> ST s () basicClear :: MVector s Char -> ST s () basicSet :: MVector s Char -> Char -> ST s () basicUnsafeCopy :: MVector s Char -> MVector s Char -> ST s () basicUnsafeMove :: MVector s Char -> MVector s Char -> ST s () basicUnsafeGrow :: MVector s Char -> Int -> ST s (MVector s Char) | |||||
Generic1 (URec Char :: k -> Type) | |||||
Defined in GHC.Generics Associated Types
| |||||
Foldable (UChar :: Type -> Type) | |||||
Defined in Data.Foldable Methods fold :: Monoid m => UChar m -> m # foldMap :: Monoid m => (a -> m) -> UChar a -> m # foldMap' :: Monoid m => (a -> m) -> UChar a -> m foldr :: (a -> b -> b) -> b -> UChar a -> b # foldr' :: (a -> b -> b) -> b -> UChar a -> b foldl :: (b -> a -> b) -> b -> UChar a -> b # foldl' :: (b -> a -> b) -> b -> UChar a -> b # foldr1 :: (a -> a -> a) -> UChar a -> a # foldl1 :: (a -> a -> a) -> UChar a -> a # elem :: Eq a => a -> UChar a -> Bool # maximum :: Ord a => UChar a -> a # minimum :: Ord a => UChar a -> a # | |||||
Traversable (UChar :: Type -> Type) | |||||
Defined in Data.Traversable | |||||
Functor (URec Char :: Type -> Type) | |||||
Generic (URec Char p) | |||||
Defined in GHC.Generics Associated Types
| |||||
Show (URec Char p) | |||||
Eq (URec Char p) | |||||
Ord (URec Char p) | |||||
Defined in GHC.Generics | |||||
newtype Vector Char | |||||
Defined in Data.Vector.Unboxed.Base | |||||
data URec Char (p :: k) | |||||
Defined in GHC.Generics | |||||
newtype MVector s Char | |||||
Defined in Data.Vector.Unboxed.Base | |||||
type Compare (a :: Char) (b :: Char) | |||||
Defined in Data.Type.Ord | |||||
type Rep1 (URec Char :: k -> Type) | |||||
Defined in GHC.Generics | |||||
type Rep (URec Char p) | |||||
Defined in GHC.Generics |
Character classification
Unicode characters are divided into letters, Data.Char.numbers, marks, punctuation, Data.Char.symbols, separators (including spaces) and others (including control characters).
isAlphaNum :: Char -> Bool #
isOctDigit :: Char -> Bool #
isHexDigit :: Char -> Bool #
isPunctuation :: Char -> Bool #
isSeparator :: Char -> Bool #
Subranges
isAsciiUpper :: Char -> Bool #
isAsciiLower :: Char -> Bool #
Unicode general categories
data GeneralCategory #
Constructors
Instances
Bounded GeneralCategory | |||||
Defined in GHC.Unicode | |||||
Enum GeneralCategory | |||||
Defined in GHC.Unicode Methods succ :: GeneralCategory -> GeneralCategory # pred :: GeneralCategory -> GeneralCategory # toEnum :: Int -> GeneralCategory # fromEnum :: GeneralCategory -> Int # enumFrom :: GeneralCategory -> [GeneralCategory] enumFromThen :: GeneralCategory -> GeneralCategory -> [GeneralCategory] enumFromTo :: GeneralCategory -> GeneralCategory -> [GeneralCategory] enumFromThenTo :: GeneralCategory -> GeneralCategory -> GeneralCategory -> [GeneralCategory] | |||||
Generic GeneralCategory | |||||
Defined in GHC.Generics Associated Types
Methods from :: GeneralCategory -> Rep GeneralCategory x to :: Rep GeneralCategory x -> GeneralCategory | |||||
Ix GeneralCategory | |||||
Defined in GHC.Unicode Methods range :: (GeneralCategory, GeneralCategory) -> [GeneralCategory] index :: (GeneralCategory, GeneralCategory) -> GeneralCategory -> Int unsafeIndex :: (GeneralCategory, GeneralCategory) -> GeneralCategory -> Int inRange :: (GeneralCategory, GeneralCategory) -> GeneralCategory -> Bool rangeSize :: (GeneralCategory, GeneralCategory) -> Int unsafeRangeSize :: (GeneralCategory, GeneralCategory) -> Int | |||||
Read GeneralCategory | |||||
Defined in GHC.Read Methods readsPrec :: Int -> ReadS GeneralCategory readList :: ReadS [GeneralCategory] readPrec :: ReadPrec GeneralCategory readListPrec :: ReadPrec [GeneralCategory] | |||||
Show GeneralCategory | |||||
Defined in GHC.Unicode Methods showsPrec :: Int -> GeneralCategory -> ShowS show :: GeneralCategory -> String # showList :: [GeneralCategory] -> ShowS | |||||
Eq GeneralCategory | |||||
Defined in GHC.Unicode Methods (==) :: GeneralCategory -> GeneralCategory -> Bool # (/=) :: GeneralCategory -> GeneralCategory -> Bool # | |||||
Ord GeneralCategory | |||||
Defined in GHC.Unicode Methods compare :: GeneralCategory -> GeneralCategory -> Ordering # (<) :: GeneralCategory -> GeneralCategory -> Bool # (<=) :: GeneralCategory -> GeneralCategory -> Bool # (>) :: GeneralCategory -> GeneralCategory -> Bool # (>=) :: GeneralCategory -> GeneralCategory -> Bool # max :: GeneralCategory -> GeneralCategory -> GeneralCategory # min :: GeneralCategory -> GeneralCategory -> GeneralCategory # | |||||
type Rep GeneralCategory | |||||
Defined in GHC.Generics type Rep GeneralCategory = D1 ('MetaData "GeneralCategory" "GHC.Unicode" "base" 'False) ((((C1 ('MetaCons "UppercaseLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LowercaseLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TitlecaseLetter" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ModifierLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherLetter" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NonSpacingMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SpacingCombiningMark" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "EnclosingMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecimalNumber" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LetterNumber" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherNumber" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ConnectorPunctuation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DashPunctuation" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OpenPunctuation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClosePunctuation" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "InitialQuote" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FinalQuote" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherPunctuation" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MathSymbol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CurrencySymbol" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ModifierSymbol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherSymbol" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Space" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineSeparator" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ParagraphSeparator" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Control" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Format" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Surrogate" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PrivateUse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAssigned" 'PrefixI 'False) (U1 :: Type -> Type)))))) |
generalCategory :: Char -> GeneralCategory #
Case conversion
Numeric representations
String representations
showLitChar :: Char -> ShowS #
lexLitChar :: ReadS String #
readLitChar :: ReadS Char #