-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Access Unicode character database
--   
--   <tt>unicode-data</tt> provides Haskell APIs to efficiently access the
--   Unicode character database. Performance is the primary goal in the
--   design of this package.
--   
--   The Haskell data structures are generated programmatically from the
--   Unicode character database (UCD) files. The latest Unicode version
--   supported by this library is 14.0.0.
@package unicode-data
@version 0.3.0


-- | Fast, static bitmap lookup utilities
module Unicode.Internal.Bits

-- | <tt>lookup64 addr index</tt> looks up the bit stored at bit index
--   <tt>index</tt> using a bitmap starting at the address <tt>addr</tt>.
--   Looks up the 64-bit word containing the bit and then the bit in that
--   word. The caller must make sure that the 64-bit word at the byte
--   address (addr + index / 64) * 8 is legally accessible memory.
lookupBit64 :: Addr# -> Int -> Bool

-- | <tt>lookupIntN addr index</tt> looks up for the <tt>index</tt>-th
--   <tt>8</tt>-bits word in the bitmap starting at <tt>addr</tt>, then
--   convert it to an Int.
--   
--   The caller must make sure that:
--   
--   <ul>
--   <li><tt>ceiling (addr + (n * 8))</tt> is legally accessible
--   <tt>Word8</tt>.</li>
--   </ul>
lookupIntN :: Addr# -> Int -> Int


module Unicode.Internal.Char.DerivedCoreProperties
isXID_Continue :: Char -> Bool
isXID_Start :: Char -> Bool
isID_Continue :: Char -> Bool
isID_Start :: Char -> Bool
isUppercase :: Char -> Bool
isLowercase :: Char -> Bool
isAlphabetic :: Char -> Bool


-- | Case and case mapping related functions.
module Unicode.Char.Case

-- | Returns <a>True</a> for lower-case letters.
isLowerCase :: Char -> Bool

-- | Returns <a>True</a> for lower-case letters.

-- | <i>Deprecated: Use isLowerCase instead. Note that the behavior of this
--   function does not match base:Data.Char.isLower. See
--   Unicode.Char.Case.Compat for behavior compatible with
--   base:Data.Char.</i>
isLower :: Char -> Bool

-- | Returns <a>True</a> for upper-case letters.
isUpperCase :: Char -> Bool

-- | Returns <a>True</a> for upper-case letters.

-- | <i>Deprecated: Use isUpperCase instead. Note that the behavior of this
--   function does not match base:Data.Char.isUpper. See
--   Unicode.Char.Case.Compat for behavior compatible with
--   base:Data.Char.</i>
isUpper :: Char -> Bool


module Unicode.Internal.Char.PropList
isPattern_Syntax :: Char -> Bool
isPattern_White_Space :: Char -> Bool
isWhite_Space :: Char -> Bool


-- | Unicode Identifier and Pattern Syntax property functions based on
--   <a>Unicode Standard Annex #31</a>
module Unicode.Char.Identifiers

-- | Returns <a>True</a> if a character is an identifier continue
--   character.
isIDContinue :: Char -> Bool

-- | Returns <a>True</a> if a character is an identifier start character.
isIDStart :: Char -> Bool

-- | Returns <a>True</a> if a character is an identifier continue
--   character, using the NFKC modifications detailed in <a>UAX #31,
--   5.1</a>.
isXIDContinue :: Char -> Bool

-- | Returns <a>True</a> if a character is an identifier start character,
--   using the NFKC modifications detailed in <a>UAX #31, 5.1</a>.
isXIDStart :: Char -> Bool

-- | Returns <a>True</a> if a character is a pattern syntax character.
isPatternSyntax :: Char -> Bool

-- | Returns <a>True</a> if a character is a pattern whitespace character.
isPatternWhitespace :: Char -> Bool


module Unicode.Internal.Char.UnicodeData.CombiningClass
combiningClass :: Char -> Int
isCombining :: Char -> Bool


module Unicode.Internal.Char.UnicodeData.Compositions
compose :: Char -> Char -> Maybe Char
composeStarters :: Char -> Char -> Maybe Char
isSecondStarter :: Char -> Bool


module Unicode.Internal.Char.UnicodeData.Decomposable
isDecomposable :: Char -> Bool


module Unicode.Internal.Char.UnicodeData.DecomposableK
isDecomposable :: Char -> Bool


module Unicode.Internal.Char.UnicodeData.Decompositions
decompose :: Char -> [Char]


module Unicode.Internal.Char.UnicodeData.DecompositionsK2
decompose :: Char -> [Char]


module Unicode.Internal.Char.UnicodeData.DecompositionsK
decompose :: Char -> [Char]


module Unicode.Internal.Char.UnicodeData.GeneralCategory
generalCategory :: Char -> Int


module Unicode.Internal.Char.UnicodeData.SimpleLowerCaseMapping
toSimpleLowerCase :: Char -> Char


module Unicode.Internal.Char.UnicodeData.SimpleTitleCaseMapping
toSimpleTitleCase :: Char -> Char


module Unicode.Internal.Char.UnicodeData.SimpleUpperCaseMapping
toSimpleUpperCase :: Char -> Char


-- | Fast division by known constants.
--   
--   Division by a constant can be replaced by a double-word
--   multiplication. Roughly speaking, instead of dividing by x, multiply
--   by 2^64/x, obtaining 128-bit-long product, and take upper 64 bits. The
--   peculiar details can be found in Hacker's Delight, Ch. 10.
--   
--   Even GHC 8.10 does not provide a primitive for a signed double-word
--   multiplication, but since our applications does not involve negative
--   integers, we convert <a>Int</a> to <a>Word</a> and use
--   <a>timesWord#</a>.
--   
--   Textbook unsigned division by 21 or 28 becomes involved, when an
--   argument is allowed to take the full range of <a>Word</a> up to 2^64.
--   Luckily, in our case the argument was casted from <a>Int</a>, so we
--   can guarantee that it is below 2^63.
module Unicode.Internal.Division

-- | Input must be non-negative.
--   
--   Instead of division by 21, we compute floor(floor((2^68+17)<i>21 * n)
--   </i> 2^68) = floor((2^68+17)<i>21 * n</i>2^68) = floor(n<i>21 +
--   (n</i>2^63 * 17<i>32)</i>21) = floor(n/21), because n<i>2^63 *
--   17</i>32 &lt; 1.
quotRem21 :: Int -> (Int, Int)

-- | Input must be non-negative.
--   
--   Instead of division by 28, we compute floor(floor((2^65+3)<i>7 * n)
--   </i> 2^67) = floor((2^65+3)<i>7 * n</i>2^67) = floor(n<i>28 +
--   (n</i>2^63 * 3<i>4)</i>28) = floor(n/28), because n<i>2^63 * 3</i>4
--   &lt; 1.
quotRem28 :: Int -> (Int, Int)


-- | General character property related functions.
module Unicode.Char.General

-- | Unicode General Categories.
--   
--   These classes are defined in the [Unicode Character
--   Database](http:/<i>www.unicode.org</i>reports<i>tr44</i>tr44-14.html#GC_Values_Table),
--   part of the Unicode standard
--   
--   <b>Note:</b> the classes must be in the same order they are listed in
--   the Unicode Standard, because some functions (e.g.
--   <a>generalCategory</a>) rely on the <a>Enum</a> instance.
data GeneralCategory

-- | <tt>Lu</tt>: Letter, Uppercase
UppercaseLetter :: GeneralCategory

-- | <tt>Ll</tt>: Letter, Lowercase
LowercaseLetter :: GeneralCategory

-- | <tt>Lt</tt>: Letter, Titlecase
TitlecaseLetter :: GeneralCategory

-- | <tt>Lm</tt>: Letter, Modifier
ModifierLetter :: GeneralCategory

-- | <tt>Lo</tt>: Letter, Other
OtherLetter :: GeneralCategory

-- | <tt>Mn</tt>: Mark, Non-Spacing
NonSpacingMark :: GeneralCategory

-- | <tt>Mc</tt>: Mark, Spacing Combining
SpacingCombiningMark :: GeneralCategory

-- | <tt>Me</tt>: Mark, Enclosing
EnclosingMark :: GeneralCategory

-- | <tt>Nd</tt>: Number, Decimal
DecimalNumber :: GeneralCategory

-- | <tt>Nl</tt>: Number, Letter
LetterNumber :: GeneralCategory

-- | <tt>No</tt>: Number, Other
OtherNumber :: GeneralCategory

-- | <tt>Pc</tt>: Punctuation, Connector
ConnectorPunctuation :: GeneralCategory

-- | <tt>Pd</tt>: Punctuation, Dash
DashPunctuation :: GeneralCategory

-- | <tt>Ps</tt>: Punctuation, Open
OpenPunctuation :: GeneralCategory

-- | <tt>Pe</tt>: Punctuation, Close
ClosePunctuation :: GeneralCategory

-- | <tt>Pi</tt>: Punctuation, Initial quote
InitialQuote :: GeneralCategory

-- | <tt>Pf</tt>: Punctuation, Final quote
FinalQuote :: GeneralCategory

-- | <tt>Po</tt>: Punctuation, Other
OtherPunctuation :: GeneralCategory

-- | <tt>Sm</tt>: Symbol, Math
MathSymbol :: GeneralCategory

-- | <tt>Sc</tt>: Symbol, Currency
CurrencySymbol :: GeneralCategory

-- | <tt>Sk</tt>: Symbol, Modifier
ModifierSymbol :: GeneralCategory

-- | <tt>So</tt>: Symbol, Other
OtherSymbol :: GeneralCategory

-- | <tt>Zs</tt>: Separator, Space
Space :: GeneralCategory

-- | <tt>Zl</tt>: Separator, Line
LineSeparator :: GeneralCategory

-- | <tt>Zp</tt>: Separator, Paragraph
ParagraphSeparator :: GeneralCategory

-- | <tt>Cc</tt>: Other, Control
Control :: GeneralCategory

-- | <tt>Cf</tt>: Other, Format
Format :: GeneralCategory

-- | <tt>Cs</tt>: Other, Surrogate
Surrogate :: GeneralCategory

-- | <tt>Co</tt>: Other, Private Use
PrivateUse :: GeneralCategory

-- | <tt>Cn</tt>: Other, Not Assigned
NotAssigned :: GeneralCategory

-- | Abbreviation of <a>GeneralCategory</a> used in the Unicode standard.
generalCategoryAbbr :: GeneralCategory -> String

-- | The Unicode general category of the character.
--   
--   This property is defined in the column 2 of the <tt>UnicodeData</tt>
--   table.
--   
--   This relies on the <a>Enum</a> instance of <a>GeneralCategory</a>,
--   which must remain in the same order as the categories are presented in
--   the Unicode standard.
--   
--   <pre>
--   show (generalCategory c) == show (Data.Char.generalCategory c)
--   </pre>
generalCategory :: Char -> GeneralCategory

-- | Returns <a>True</a> for alphabetic Unicode characters (lower-case,
--   upper-case and title-case letters, plus letters of caseless scripts
--   and modifiers letters).
--   
--   <b>Note:</b> this function is <i>not</i> equivalent to <a>isAlpha</a>
--   /<a>isLetter</a>:
--   
--   <ul>
--   <li><tt>isAlpha</tt> matches the following general
--   categories:<ul><li><a>UppercaseLetter</a>
--   (<tt>Lu</tt>)</li><li><a>LowercaseLetter</a>
--   (<tt>Ll</tt>)</li><li><a>TitlecaseLetter</a>
--   (<tt>Lt</tt>)</li><li><a>ModifierLetter</a>
--   (<tt>Lm</tt>)</li><li><a>OtherLetter</a> (<tt>Lo</tt>)</li></ul></li>
--   <li>whereas <a>isAlphabetic</a> matches:<ul><li><tt>Uppercase</tt>
--   <a>property</a></li><li><tt>Lowercase</tt>
--   <a>property</a></li><li><a>TitlecaseLetter</a>
--   (<tt>Lt</tt>)</li><li><a>ModifierLetter</a>
--   (<tt>Lm</tt>)</li><li><a>OtherLetter</a>
--   (<tt>Lo</tt>)</li><li><a>LetterNumber</a>
--   (<tt>Nl</tt>)</li><li><tt>Other_Alphabetic</tt>
--   <a>property</a></li></ul></li>
--   </ul>
isAlphabetic :: Char -> Bool

-- | Selects alphabetic or numeric Unicode characters.
--   
--   This function returns <a>True</a> if its argument has one of the
--   following <a>GeneralCategory</a>s, or <a>False</a> otherwise:
--   
--   <ul>
--   <li><a>UppercaseLetter</a></li>
--   <li><a>LowercaseLetter</a></li>
--   <li><a>TitlecaseLetter</a></li>
--   <li><a>ModifierLetter</a></li>
--   <li><a>OtherLetter</a></li>
--   <li><a>DecimalNumber</a></li>
--   <li><a>LetterNumber</a></li>
--   <li><a>OtherNumber</a></li>
--   </ul>
--   
--   <pre>
--   isAlphaNum c == Data.Char.isAlphaNum c
--   </pre>
isAlphaNum :: Char -> Bool

-- | Selects control characters, which are the non-printing characters of
--   the Latin-1 subset of Unicode.
--   
--   This function returns <a>True</a> if its argument has the
--   <a>GeneralCategory</a> <a>Control</a>.
--   
--   <pre>
--   isControl c == Data.Char.isControl c
--   </pre>
isControl :: Char -> Bool

-- | Selects Unicode mark characters, for example accents and the like,
--   which combine with preceding characters.
--   
--   This function returns <a>True</a> if its argument has one of the
--   following <a>GeneralCategory</a>s, or <a>False</a> otherwise:
--   
--   <ul>
--   <li><a>NonSpacingMark</a></li>
--   <li><a>SpacingCombiningMark</a></li>
--   <li><a>EnclosingMark</a></li>
--   </ul>
--   
--   <pre>
--   isMark c == Data.Char.isMark c
--   </pre>
isMark :: Char -> Bool

-- | Selects printable Unicode characters (letters, numbers, marks,
--   punctuation, symbols and spaces).
--   
--   This function returns <a>False</a> if its argument has one of the
--   following <a>GeneralCategory</a>s, or <a>True</a> otherwise:
--   
--   <ul>
--   <li><a>LineSeparator</a></li>
--   <li><a>ParagraphSeparator</a></li>
--   <li><a>Control</a></li>
--   <li><a>Format</a></li>
--   <li><a>Surrogate</a></li>
--   <li><a>PrivateUse</a></li>
--   <li><a>NotAssigned</a></li>
--   </ul>
--   
--   <pre>
--   isPrint c == Data.Char.isPrint c
--   </pre>
isPrint :: Char -> Bool

-- | Selects Unicode punctuation characters, including various kinds of
--   connectors, brackets and quotes.
--   
--   This function returns <a>True</a> if its argument has one of the
--   following <a>GeneralCategory</a>s, or <a>False</a> otherwise:
--   
--   <ul>
--   <li><a>ConnectorPunctuation</a></li>
--   <li><a>DashPunctuation</a></li>
--   <li><a>OpenPunctuation</a></li>
--   <li><a>ClosePunctuation</a></li>
--   <li><a>InitialQuote</a></li>
--   <li><a>FinalQuote</a></li>
--   <li><a>OtherPunctuation</a></li>
--   </ul>
--   
--   <pre>
--   isPunctuation c == Data.Char.isPunctuation c
--   </pre>
isPunctuation :: Char -> Bool

-- | Selects Unicode space and separator characters.
--   
--   This function returns <a>True</a> if its argument has one of the
--   following <a>GeneralCategory</a>s, or <a>False</a> otherwise:
--   
--   <ul>
--   <li><a>Space</a></li>
--   <li><a>LineSeparator</a></li>
--   <li><a>ParagraphSeparator</a></li>
--   </ul>
--   
--   <pre>
--   isSeparator c == Data.Char.isSeparator c
--   </pre>
isSeparator :: Char -> Bool

-- | Selects Unicode symbol characters, including mathematical and currency
--   symbols.
--   
--   This function returns <a>True</a> if its argument has one of the
--   following <a>GeneralCategory</a>s, or <a>False</a> otherwise: *
--   <a>MathSymbol</a> * <a>CurrencySymbol</a> * <a>ModifierSymbol</a> *
--   <a>OtherSymbol</a>
--   
--   <pre>
--   isSymbol c == Data.Char.isSymbol c
--   </pre>
isSymbol :: Char -> Bool

-- | Returns <a>True</a> for any whitespace characters, and the control
--   characters <tt>\t</tt>, <tt>\n</tt>, <tt>\r</tt>, <tt>\f</tt>,
--   <tt>\v</tt>.
--   
--   See: <a>Unicode <tt>White_Space</tt></a>.
--   
--   <b>Note:</b> <a>isWhiteSpace</a> is <i>not</i> equivalent to
--   <a>isSpace</a>. <a>isWhiteSpace</a> selects the same characters from
--   <a>isSpace</a> plus the following:
--   
--   <ul>
--   <li><tt>U+0085</tt> NEXT LINE (NEL)</li>
--   <li><tt>U+2028</tt> LINE SEPARATOR</li>
--   <li><tt>U+2029</tt> PARAGRAPH SEPARATOR</li>
--   </ul>
isWhiteSpace :: Char -> Bool

-- | Returns <a>True</a> for alphabetic Unicode characters (lower-case,
--   upper-case and title-case letters, plus letters of caseless scripts
--   and modifiers letters).

-- | <i>Deprecated: Use isAlphabetic instead. Note that the behavior of
--   this function does not match base:Data.Char.isLetter. See
--   Unicode.Char.General.Compat for behavior compatible with
--   base:Data.Char.</i>
isLetter :: Char -> Bool

-- | Returns <a>True</a> for any whitespace characters, and the control
--   characters <tt>\t</tt>, <tt>\n</tt>, <tt>\r</tt>, <tt>\f</tt>,
--   <tt>\v</tt>.

-- | <i>Deprecated: Use isWhiteSpace instead. Note that the behavior of
--   this function does not match base:Data.Char.isSpace. See
--   Unicode.Char.General.Compat for behavior compatible with
--   base:Data.Char.</i>
isSpace :: Char -> Bool

-- | Selects the first 128 characters of the Unicode character set,
--   corresponding to the ASCII character set.
isAscii :: Char -> Bool

-- | Selects the first 256 characters of the Unicode character set,
--   corresponding to the ISO 8859-1 (Latin-1) character set.
isLatin1 :: Char -> Bool

-- | Selects ASCII upper-case letters, i.e. characters satisfying both
--   <a>isAscii</a> and <a>isUpper</a>.
isAsciiUpper :: Char -> Bool

-- | Selects ASCII lower-case letters, i.e. characters satisfying both
--   <a>isAscii</a> and <a>isLower</a>.
isAsciiLower :: Char -> Bool

-- | Determine whether a character is a jamo L, V or T character.
isJamo :: Char -> Bool

-- | Total count of all jamo characters.
--   
--   <pre>
--   jamoNCount = jamoVCount * jamoTCount
--   </pre>
jamoNCount :: Int

-- | First leading consonant jamo.
jamoLFirst :: Int

-- | Total count of leading consonant jamo.
jamoLCount :: Int

-- | Given a Unicode character, if it is a leading jamo, return its index
--   in the list of leading jamo consonants, otherwise return
--   <a>Nothing</a>.
jamoLIndex :: Char -> Maybe Int

-- | Last leading consonant jamo.
jamoLLast :: Int

-- | First vowel jamo.
jamoVFirst :: Int

-- | Total count of vowel jamo.
jamoVCount :: Int

-- | Given a Unicode character, if it is a vowel jamo, return its index in
--   the list of vowel jamo, otherwise return <a>Nothing</a>.
jamoVIndex :: Char -> Maybe Int

-- | Last vowel jamo.
jamoVLast :: Int

-- | The first trailing consonant jamo.
--   
--   Note that <a>jamoTFirst</a> does not represent a valid T, it
--   represents a missing T i.e. LV without a T. See comments under
--   <a>jamoTIndex</a> .
jamoTFirst :: Int

-- | Total count of trailing consonant jamo.
jamoTCount :: Int

-- | Given a Unicode character, if it is a trailing jamo consonant, return
--   its index in the list of trailing jamo consonants, otherwise return
--   <a>Nothing</a>.
--   
--   Note that index 0 is not a valid index for a trailing consonant. Index
--   0 corresponds to an LV syllable, without a T. See "Hangul Syllable
--   Decomposition" in the Conformance chapter of the Unicode standard for
--   more details.
jamoTIndex :: Char -> Maybe Int

-- | Last trailing consonant jamo.
jamoTLast :: Int

-- | Codepoint of the first pre-composed Hangul character.
hangulFirst :: Int

-- | Codepoint of the last Hangul character.
hangulLast :: Int

-- | Determine if the given character is a precomposed Hangul syllable.
isHangul :: Char -> Bool

-- | Determine if the given character is a Hangul LV syllable.
isHangulLV :: Char -> Bool
instance GHC.Ix.Ix Unicode.Char.General.GeneralCategory
instance GHC.Enum.Bounded Unicode.Char.General.GeneralCategory
instance GHC.Enum.Enum Unicode.Char.General.GeneralCategory
instance GHC.Classes.Ord Unicode.Char.General.GeneralCategory
instance GHC.Classes.Eq Unicode.Char.General.GeneralCategory
instance GHC.Show.Show Unicode.Char.General.GeneralCategory


-- | Numeric character property related functions.
module Unicode.Char.Numeric

-- | Selects Unicode numeric characters, including digits from various
--   scripts, Roman numerals, et cetera.
--   
--   This function returns <a>True</a> if its argument has one of the
--   following <a>GeneralCategory</a>s, or <a>False</a> otherwise:
--   
--   <ul>
--   <li><a>DecimalNumber</a></li>
--   <li><a>LetterNumber</a></li>
--   <li><a>OtherNumber</a></li>
--   </ul>
--   
--   <pre>
--   isNumber c == Data.Char.isNumber c
--   </pre>
isNumber :: Char -> Bool

-- | Selects ASCII digits, i.e. <tt>'0'</tt>..<tt>'9'</tt>.
isDigit :: Char -> Bool

-- | Selects ASCII octal digits, i.e. <tt>'0'</tt>..<tt>'7'</tt>.
isOctDigit :: Char -> Bool

-- | Selects ASCII hexadecimal digits, i.e. <tt>'0'</tt>..<tt>'9'</tt>,
--   <tt>'a'</tt>..<tt>'f'</tt>, <tt>'A'</tt>..<tt>'F'</tt>.
isHexDigit :: Char -> Bool

-- | Convert a single digit <a>Char</a> to the corresponding <a>Int</a>.
--   This function fails unless its argument satisfies <a>isHexDigit</a>,
--   but recognises both upper- and lower-case hexadecimal digits (that is,
--   <tt>'0'</tt>..<tt>'9'</tt>, <tt>'a'</tt>..<tt>'f'</tt>,
--   <tt>'A'</tt>..<tt>'F'</tt>).
--   
--   <h4><b>Examples</b></h4>
--   
--   Characters <tt>'0'</tt> through <tt>'9'</tt> are converted properly to
--   <tt>0..9</tt>:
--   
--   <pre>
--   &gt;&gt;&gt; map digitToInt ['0'..'9']
--   [0,1,2,3,4,5,6,7,8,9]
--   </pre>
--   
--   Both upper- and lower-case <tt>'A'</tt> through <tt>'F'</tt> are
--   converted as well, to <tt>10..15</tt>.
--   
--   <pre>
--   &gt;&gt;&gt; map digitToInt ['a'..'f']
--   [10,11,12,13,14,15]
--   
--   &gt;&gt;&gt; map digitToInt ['A'..'F']
--   [10,11,12,13,14,15]
--   </pre>
--   
--   Anything else throws an exception:
--   
--   <pre>
--   &gt;&gt;&gt; digitToInt 'G'
--   *** Exception: Char.digitToInt: not a digit 'G'
--   
--   &gt;&gt;&gt; digitToInt '♥'
--   *** Exception: Char.digitToInt: not a digit '\9829'
--   </pre>
digitToInt :: Char -> Int

-- | Convert an <a>Int</a> in the range <tt>0</tt>..<tt>15</tt> to the
--   corresponding single digit <a>Char</a>. This function fails on other
--   inputs, and generates lower-case hexadecimal digits.
intToDigit :: Int -> Char


-- | Low level Unicode database functions to facilitate Unicode
--   normalization.
--   
--   For more information on Unicode normalization please refer to the
--   following sections of the <a>Unicode standard</a>:
--   
--   <ul>
--   <li>2 General Structure<ul><li>2.3 Compatibility
--   Characters</li><li>2.12 Equivalent Sequences</li></ul></li>
--   <li>3 Conformance<ul><li>3.6 Combination</li><li>3.7
--   Decomposition</li><li>3.11 Normalization Forms</li><li>3.12 Conjoining
--   Jamo Behavior</li></ul></li>
--   <li>4 Character Properties<ul><li>4.3 Combining Classes</li></ul></li>
--   <li><a>Unicode® Standard Annex #15 - Unicode Normalization
--   Forms</a></li>
--   <li><a>Unicode® Standard Annex #44 - Unicode Character
--   Database</a></li>
--   </ul>
module Unicode.Char.Normalization

-- | Returns <a>True</a> if a character is a combining character.
isCombining :: Char -> Bool

-- | Returns the combining class of a character.
combiningClass :: Char -> Int

-- | Return <a>True</a> if a starter character may combine with some
--   preceding starter character.
isCombiningStarter :: Char -> Bool

-- | Compose a starter character (combining class 0) with a combining
--   character (non-zero combining class). Returns the composed character
--   if the starter combines with the combining character, returns
--   <a>Nothing</a> otherwise.
compose :: Char -> Char -> Maybe Char

-- | Compose a starter character with another starter character. Returns
--   the composed character if the two starters combine, returns
--   <a>Nothing</a> otherwise.
composeStarters :: Char -> Char -> Maybe Char

-- | Whether we are decomposing in canonical or compatibility mode.
data DecomposeMode
Canonical :: DecomposeMode
Kompat :: DecomposeMode

-- | Given a non-Hangul character determine if the character is
--   decomposable. Note that in case compatibility decompositions a
--   character may decompose into a single compatibility character.
isDecomposable :: DecomposeMode -> Char -> Bool

-- | Decompose a non-Hangul character into its canonical or compatibility
--   decompositions. Note that the resulting characters may further
--   decompose.
decompose :: DecomposeMode -> Char -> [Char]

-- | Decompose a Hangul syllable into its corresponding Jamo characters.
decomposeHangul :: Char -> (Char, Char, Char)


-- | Compatibility module for general character property related functions.
--   
--   The functions of this module are drop-in replacement for those in
--   <a>Data.Char</a>. They are similar but not identical to some functions
--   in <a>Unicode.Char.General</a>, therefore they are placed in a
--   separate module in order to avoid ambiguity.
module Unicode.Char.General.Compat

-- | Same as <a>isLetter</a>.
isAlpha :: Char -> Bool

-- | Selects alphabetic Unicode characters (lower-case, upper-case and
--   title-case letters, plus letters of caseless scripts and modifiers
--   letters).
--   
--   This function returns <a>True</a> if its argument has one of the
--   following <a>GeneralCategory</a>s, or <a>False</a> otherwise:
--   
--   <ul>
--   <li><a>UppercaseLetter</a></li>
--   <li><a>LowercaseLetter</a></li>
--   <li><a>TitlecaseLetter</a></li>
--   <li><a>ModifierLetter</a></li>
--   <li><a>OtherLetter</a></li>
--   </ul>
--   
--   <b>Note:</b> this function is <i>not</i> equivalent to
--   <a>isAlphabetic</a>. See the description of <a>isAlphabetic</a> for
--   further details.
--   
--   <pre>
--   isLetter c == Data.Char.isLetter c
--   </pre>
isLetter :: Char -> Bool

-- | Selects Unicode space characters (general category <a>Space</a>), and
--   the control characters <tt>\t</tt>, <tt>\n</tt>, <tt>\r</tt>,
--   <tt>\f</tt>, <tt>\v</tt>.
--   
--   <b>Note:</b> <a>isSpace</a> is <i>not</i> equivalent to
--   <a>isWhiteSpace</a>. <a>isWhiteSpace</a> selects the same characters
--   from <a>isSpace</a> plus the following:
--   
--   <ul>
--   <li><tt>U+0085</tt> NEXT LINE (NEL)</li>
--   <li><tt>U+2028</tt> LINE SEPARATOR</li>
--   <li><tt>U+2029</tt> PARAGRAPH SEPARATOR</li>
--   </ul>
--   
--   <pre>
--   isSpace c == Data.Char.isSpace c
--   </pre>
isSpace :: Char -> Bool


-- | Compatibility module for case and case mapping related functions..
--   
--   The functions of this module are drop-in replacement for those in
--   <a>Data.Char</a>. They are similar but not identical to some functions
--   in <a>Unicode.Char.Case</a>, therefore they are placed in a separate
--   module in order to avoid ambiguity.
module Unicode.Char.Case.Compat

-- | 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 <i>Lj</i>.
--   
--   <pre>
--   isUpper c == Data.Char.isUpper c
--   </pre>
isUpper :: Char -> Bool

-- | Selects lower-case alphabetic Unicode characters (letters).
--   
--   <pre>
--   isLower c == Data.Char.isLower c
--   </pre>
isLower :: Char -> Bool

-- | Convert a letter to the corresponding upper-case letter, if any. Any
--   other character is returned unchanged.
--   
--   <pre>
--   toUpper c == Data.Char.toUpper c
--   </pre>
toUpper :: Char -> Char

-- | Convert a letter to the corresponding lower-case letter, if any. Any
--   other character is returned unchanged.
--   
--   <pre>
--   toLower c == Data.Char.toLower c
--   </pre>
toLower :: 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.
--   
--   <pre>
--   toTitle c == Data.Char.toTitle c
--   </pre>
toTitle :: Char -> Char


-- | This module provides APIs to access the Unicode character database
--   (UCD) corresponding to <a>Unicode Standard version 14.0.0</a>.
--   
--   This module re-exports several sub-modules under it. The sub-module
--   structure under <a>Char</a> is largely based on the <a>"Property Index
--   by Scope of Use" in Unicode® Standard Annex #44</a>.
--   
--   The <tt>Unicode.Char.*</tt> modules in turn depend on
--   <tt>Unicode.Internal.Char.*</tt> modules which are programmatically
--   generated from the Unicode standard's Unicode character database
--   files. The module structure under <tt>Unicode.Internal.Char</tt> is
--   largely based on the UCD text file names from which the properties are
--   generated.
--   
--   For the original UCD files used in this code please refer to the
--   <tt>UCD</tt> section on the Unicode standard page. See
--   <a>https://www.unicode.org/reports/tr44/</a> to understand the
--   contents and the format of the unicode database files.
module Unicode.Char

-- | Same as <a>isLetter</a>.
isAlpha :: Char -> Bool

-- | Convert a letter to the corresponding upper-case letter, if any. Any
--   other character is returned unchanged.
--   
--   <pre>
--   toUpper c == Data.Char.toUpper c
--   </pre>
toUpper :: Char -> Char

-- | Convert a letter to the corresponding lower-case letter, if any. Any
--   other character is returned unchanged.
--   
--   <pre>
--   toLower c == Data.Char.toLower c
--   </pre>
toLower :: 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.
--   
--   <pre>
--   toTitle c == Data.Char.toTitle c
--   </pre>
toTitle :: Char -> Char

-- | Version of Unicode standard used by <tt>unicode-data</tt>.
unicodeVersion :: Version

-- | The <a>fromEnum</a> method restricted to the type <a>Char</a>.
ord :: Char -> Int

-- | The <a>toEnum</a> method restricted to the type <a>Char</a>.
chr :: Int -> Char
