HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleunicode-data-0.4.0.1Haskell2010

Unicode.Char.Case.Compat

Compatibility module for case and case mapping related functions.

The functions of this module are drop-in replacement for those in Data.Char. They are similar but not identical to some functions in Unicode.Char.Case, therefore they are placed in a separate module in order to avoid ambiguity.

  • 5 values

Predicates

2 declarations
valueisUpper :: Char -> Bool
#

Selects upper-case or title-case alphabetic Unicode characters (letters). Title case is used by a small number of letter ligatures like the single-character form of Lj.

It matches characters with general category UppercaseLetter and TitlecaseLetter.

See: isUpperCase for the full upper case predicate.

Property
isUpper c == Data.Char.isUpper c
valueisLower :: Char -> Bool
#

Selects lower-case alphabetic Unicode characters (letters).

It matches characters with general category LowercaseLetter.

See: isLowerCase for the full lower case predicate.

Property
isLower c == Data.Char.isLower c

Case conversion

3 declarations
valuetoUpper :: Char -> Char
#

Convert a letter to the corresponding upper-case letter, if any. Any other character is returned unchanged.

It uses the character property Simple_Uppercase_Mapping.

See: upperCaseMapping and toUpperString for full upper case conversion.

Property
toUpper c == Data.Char.toUpper c
valuetoLower :: Char -> Char
#

Convert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.

It uses the character property Simple_Lowercase_Mapping.

See: lowerCaseMapping and toLowerString for full lower case conversion.

Property
toLower c == Data.Char.toLower c
valuetoTitle :: Char -> Char
#

Convert a letter to the corresponding title-case or upper-case letter, if any. (Title case differs from upper case only for a small number of ligature letters.) Any other character is returned unchanged.

It uses the character property Simple_Titlecase_Mapping.

See: titleCaseMapping and toTitleString for full title case conversion.

Property
toTitle c == Data.Char.toTitle c