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


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


-- | 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


-- | Unicode <a>blocks</a> related functions.
module Unicode.Char.General.Blocks

-- | Unicode <a>block</a>.
--   
--   There is a total of 327 blocks.
data Block

-- | <tt>U+0000..U+007F</tt>: Basic Latin.
BasicLatin :: Block

-- | <tt>U+0080..U+00FF</tt>: Latin-1 Supplement.
Latin1Supplement :: Block

-- | <tt>U+0100..U+017F</tt>: Latin Extended-A.
LatinExtendedA :: Block

-- | <tt>U+0180..U+024F</tt>: Latin Extended-B.
LatinExtendedB :: Block

-- | <tt>U+0250..U+02AF</tt>: IPA Extensions.
IPAExtensions :: Block

-- | <tt>U+02B0..U+02FF</tt>: Spacing Modifier Letters.
SpacingModifierLetters :: Block

-- | <tt>U+0300..U+036F</tt>: Combining Diacritical Marks.
CombiningDiacriticalMarks :: Block

-- | <tt>U+0370..U+03FF</tt>: Greek and Coptic.
GreekAndCoptic :: Block

-- | <tt>U+0400..U+04FF</tt>: Cyrillic.
Cyrillic :: Block

-- | <tt>U+0500..U+052F</tt>: Cyrillic Supplement.
CyrillicSupplement :: Block

-- | <tt>U+0530..U+058F</tt>: Armenian.
Armenian :: Block

-- | <tt>U+0590..U+05FF</tt>: Hebrew.
Hebrew :: Block

-- | <tt>U+0600..U+06FF</tt>: Arabic.
Arabic :: Block

-- | <tt>U+0700..U+074F</tt>: Syriac.
Syriac :: Block

-- | <tt>U+0750..U+077F</tt>: Arabic Supplement.
ArabicSupplement :: Block

-- | <tt>U+0780..U+07BF</tt>: Thaana.
Thaana :: Block

-- | <tt>U+07C0..U+07FF</tt>: NKo.
NKo :: Block

-- | <tt>U+0800..U+083F</tt>: Samaritan.
Samaritan :: Block

-- | <tt>U+0840..U+085F</tt>: Mandaic.
Mandaic :: Block

-- | <tt>U+0860..U+086F</tt>: Syriac Supplement.
SyriacSupplement :: Block

-- | <tt>U+0870..U+089F</tt>: Arabic Extended-B.
ArabicExtendedB :: Block

-- | <tt>U+08A0..U+08FF</tt>: Arabic Extended-A.
ArabicExtendedA :: Block

-- | <tt>U+0900..U+097F</tt>: Devanagari.
Devanagari :: Block

-- | <tt>U+0980..U+09FF</tt>: Bengali.
Bengali :: Block

-- | <tt>U+0A00..U+0A7F</tt>: Gurmukhi.
Gurmukhi :: Block

-- | <tt>U+0A80..U+0AFF</tt>: Gujarati.
Gujarati :: Block

-- | <tt>U+0B00..U+0B7F</tt>: Oriya.
Oriya :: Block

-- | <tt>U+0B80..U+0BFF</tt>: Tamil.
Tamil :: Block

-- | <tt>U+0C00..U+0C7F</tt>: Telugu.
Telugu :: Block

-- | <tt>U+0C80..U+0CFF</tt>: Kannada.
Kannada :: Block

-- | <tt>U+0D00..U+0D7F</tt>: Malayalam.
Malayalam :: Block

-- | <tt>U+0D80..U+0DFF</tt>: Sinhala.
Sinhala :: Block

-- | <tt>U+0E00..U+0E7F</tt>: Thai.
Thai :: Block

-- | <tt>U+0E80..U+0EFF</tt>: Lao.
Lao :: Block

-- | <tt>U+0F00..U+0FFF</tt>: Tibetan.
Tibetan :: Block

-- | <tt>U+1000..U+109F</tt>: Myanmar.
Myanmar :: Block

-- | <tt>U+10A0..U+10FF</tt>: Georgian.
Georgian :: Block

-- | <tt>U+1100..U+11FF</tt>: Hangul Jamo.
HangulJamo :: Block

-- | <tt>U+1200..U+137F</tt>: Ethiopic.
Ethiopic :: Block

-- | <tt>U+1380..U+139F</tt>: Ethiopic Supplement.
EthiopicSupplement :: Block

-- | <tt>U+13A0..U+13FF</tt>: Cherokee.
Cherokee :: Block

-- | <tt>U+1400..U+167F</tt>: Unified Canadian Aboriginal Syllabics.
UnifiedCanadianAboriginalSyllabics :: Block

-- | <tt>U+1680..U+169F</tt>: Ogham.
Ogham :: Block

-- | <tt>U+16A0..U+16FF</tt>: Runic.
Runic :: Block

-- | <tt>U+1700..U+171F</tt>: Tagalog.
Tagalog :: Block

-- | <tt>U+1720..U+173F</tt>: Hanunoo.
Hanunoo :: Block

-- | <tt>U+1740..U+175F</tt>: Buhid.
Buhid :: Block

-- | <tt>U+1760..U+177F</tt>: Tagbanwa.
Tagbanwa :: Block

-- | <tt>U+1780..U+17FF</tt>: Khmer.
Khmer :: Block

-- | <tt>U+1800..U+18AF</tt>: Mongolian.
Mongolian :: Block

-- | <tt>U+18B0..U+18FF</tt>: Unified Canadian Aboriginal Syllabics
--   Extended.
UnifiedCanadianAboriginalSyllabicsExtended :: Block

-- | <tt>U+1900..U+194F</tt>: Limbu.
Limbu :: Block

-- | <tt>U+1950..U+197F</tt>: Tai Le.
TaiLe :: Block

-- | <tt>U+1980..U+19DF</tt>: New Tai Lue.
NewTaiLue :: Block

-- | <tt>U+19E0..U+19FF</tt>: Khmer Symbols.
KhmerSymbols :: Block

-- | <tt>U+1A00..U+1A1F</tt>: Buginese.
Buginese :: Block

-- | <tt>U+1A20..U+1AAF</tt>: Tai Tham.
TaiTham :: Block

-- | <tt>U+1AB0..U+1AFF</tt>: Combining Diacritical Marks Extended.
CombiningDiacriticalMarksExtended :: Block

-- | <tt>U+1B00..U+1B7F</tt>: Balinese.
Balinese :: Block

-- | <tt>U+1B80..U+1BBF</tt>: Sundanese.
Sundanese :: Block

-- | <tt>U+1BC0..U+1BFF</tt>: Batak.
Batak :: Block

-- | <tt>U+1C00..U+1C4F</tt>: Lepcha.
Lepcha :: Block

-- | <tt>U+1C50..U+1C7F</tt>: Ol Chiki.
OlChiki :: Block

-- | <tt>U+1C80..U+1C8F</tt>: Cyrillic Extended-C.
CyrillicExtendedC :: Block

-- | <tt>U+1C90..U+1CBF</tt>: Georgian Extended.
GeorgianExtended :: Block

-- | <tt>U+1CC0..U+1CCF</tt>: Sundanese Supplement.
SundaneseSupplement :: Block

-- | <tt>U+1CD0..U+1CFF</tt>: Vedic Extensions.
VedicExtensions :: Block

-- | <tt>U+1D00..U+1D7F</tt>: Phonetic Extensions.
PhoneticExtensions :: Block

-- | <tt>U+1D80..U+1DBF</tt>: Phonetic Extensions Supplement.
PhoneticExtensionsSupplement :: Block

-- | <tt>U+1DC0..U+1DFF</tt>: Combining Diacritical Marks Supplement.
CombiningDiacriticalMarksSupplement :: Block

-- | <tt>U+1E00..U+1EFF</tt>: Latin Extended Additional.
LatinExtendedAdditional :: Block

-- | <tt>U+1F00..U+1FFF</tt>: Greek Extended.
GreekExtended :: Block

-- | <tt>U+2000..U+206F</tt>: General Punctuation.
GeneralPunctuation :: Block

-- | <tt>U+2070..U+209F</tt>: Superscripts and Subscripts.
SuperscriptsAndSubscripts :: Block

-- | <tt>U+20A0..U+20CF</tt>: Currency Symbols.
CurrencySymbols :: Block

-- | <tt>U+20D0..U+20FF</tt>: Combining Diacritical Marks for Symbols.
CombiningDiacriticalMarksForSymbols :: Block

-- | <tt>U+2100..U+214F</tt>: Letterlike Symbols.
LetterlikeSymbols :: Block

-- | <tt>U+2150..U+218F</tt>: Number Forms.
NumberForms :: Block

-- | <tt>U+2190..U+21FF</tt>: Arrows.
Arrows :: Block

-- | <tt>U+2200..U+22FF</tt>: Mathematical Operators.
MathematicalOperators :: Block

-- | <tt>U+2300..U+23FF</tt>: Miscellaneous Technical.
MiscellaneousTechnical :: Block

-- | <tt>U+2400..U+243F</tt>: Control Pictures.
ControlPictures :: Block

-- | <tt>U+2440..U+245F</tt>: Optical Character Recognition.
OpticalCharacterRecognition :: Block

-- | <tt>U+2460..U+24FF</tt>: Enclosed Alphanumerics.
EnclosedAlphanumerics :: Block

-- | <tt>U+2500..U+257F</tt>: Box Drawing.
BoxDrawing :: Block

-- | <tt>U+2580..U+259F</tt>: Block Elements.
BlockElements :: Block

-- | <tt>U+25A0..U+25FF</tt>: Geometric Shapes.
GeometricShapes :: Block

-- | <tt>U+2600..U+26FF</tt>: Miscellaneous Symbols.
MiscellaneousSymbols :: Block

-- | <tt>U+2700..U+27BF</tt>: Dingbats.
Dingbats :: Block

-- | <tt>U+27C0..U+27EF</tt>: Miscellaneous Mathematical Symbols-A.
MiscellaneousMathematicalSymbolsA :: Block

-- | <tt>U+27F0..U+27FF</tt>: Supplemental Arrows-A.
SupplementalArrowsA :: Block

-- | <tt>U+2800..U+28FF</tt>: Braille Patterns.
BraillePatterns :: Block

-- | <tt>U+2900..U+297F</tt>: Supplemental Arrows-B.
SupplementalArrowsB :: Block

-- | <tt>U+2980..U+29FF</tt>: Miscellaneous Mathematical Symbols-B.
MiscellaneousMathematicalSymbolsB :: Block

-- | <tt>U+2A00..U+2AFF</tt>: Supplemental Mathematical Operators.
SupplementalMathematicalOperators :: Block

-- | <tt>U+2B00..U+2BFF</tt>: Miscellaneous Symbols and Arrows.
MiscellaneousSymbolsAndArrows :: Block

-- | <tt>U+2C00..U+2C5F</tt>: Glagolitic.
Glagolitic :: Block

-- | <tt>U+2C60..U+2C7F</tt>: Latin Extended-C.
LatinExtendedC :: Block

-- | <tt>U+2C80..U+2CFF</tt>: Coptic.
Coptic :: Block

-- | <tt>U+2D00..U+2D2F</tt>: Georgian Supplement.
GeorgianSupplement :: Block

-- | <tt>U+2D30..U+2D7F</tt>: Tifinagh.
Tifinagh :: Block

-- | <tt>U+2D80..U+2DDF</tt>: Ethiopic Extended.
EthiopicExtended :: Block

-- | <tt>U+2DE0..U+2DFF</tt>: Cyrillic Extended-A.
CyrillicExtendedA :: Block

-- | <tt>U+2E00..U+2E7F</tt>: Supplemental Punctuation.
SupplementalPunctuation :: Block

-- | <tt>U+2E80..U+2EFF</tt>: CJK Radicals Supplement.
CJKRadicalsSupplement :: Block

-- | <tt>U+2F00..U+2FDF</tt>: Kangxi Radicals.
KangxiRadicals :: Block

-- | <tt>U+2FF0..U+2FFF</tt>: Ideographic Description Characters.
IdeographicDescriptionCharacters :: Block

-- | <tt>U+3000..U+303F</tt>: CJK Symbols and Punctuation.
CJKSymbolsAndPunctuation :: Block

-- | <tt>U+3040..U+309F</tt>: Hiragana.
Hiragana :: Block

-- | <tt>U+30A0..U+30FF</tt>: Katakana.
Katakana :: Block

-- | <tt>U+3100..U+312F</tt>: Bopomofo.
Bopomofo :: Block

-- | <tt>U+3130..U+318F</tt>: Hangul Compatibility Jamo.
HangulCompatibilityJamo :: Block

-- | <tt>U+3190..U+319F</tt>: Kanbun.
Kanbun :: Block

-- | <tt>U+31A0..U+31BF</tt>: Bopomofo Extended.
BopomofoExtended :: Block

-- | <tt>U+31C0..U+31EF</tt>: CJK Strokes.
CJKStrokes :: Block

-- | <tt>U+31F0..U+31FF</tt>: Katakana Phonetic Extensions.
KatakanaPhoneticExtensions :: Block

-- | <tt>U+3200..U+32FF</tt>: Enclosed CJK Letters and Months.
EnclosedCJKLettersAndMonths :: Block

-- | <tt>U+3300..U+33FF</tt>: CJK Compatibility.
CJKCompatibility :: Block

-- | <tt>U+3400..U+4DBF</tt>: CJK Unified Ideographs Extension A.
CJKUnifiedIdeographsExtensionA :: Block

-- | <tt>U+4DC0..U+4DFF</tt>: Yijing Hexagram Symbols.
YijingHexagramSymbols :: Block

-- | <tt>U+4E00..U+9FFF</tt>: CJK Unified Ideographs.
CJKUnifiedIdeographs :: Block

-- | <tt>U+A000..U+A48F</tt>: Yi Syllables.
YiSyllables :: Block

-- | <tt>U+A490..U+A4CF</tt>: Yi Radicals.
YiRadicals :: Block

-- | <tt>U+A4D0..U+A4FF</tt>: Lisu.
Lisu :: Block

-- | <tt>U+A500..U+A63F</tt>: Vai.
Vai :: Block

-- | <tt>U+A640..U+A69F</tt>: Cyrillic Extended-B.
CyrillicExtendedB :: Block

-- | <tt>U+A6A0..U+A6FF</tt>: Bamum.
Bamum :: Block

-- | <tt>U+A700..U+A71F</tt>: Modifier Tone Letters.
ModifierToneLetters :: Block

-- | <tt>U+A720..U+A7FF</tt>: Latin Extended-D.
LatinExtendedD :: Block

-- | <tt>U+A800..U+A82F</tt>: Syloti Nagri.
SylotiNagri :: Block

-- | <tt>U+A830..U+A83F</tt>: Common Indic Number Forms.
CommonIndicNumberForms :: Block

-- | <tt>U+A840..U+A87F</tt>: Phags-pa.
PhagsPa :: Block

-- | <tt>U+A880..U+A8DF</tt>: Saurashtra.
Saurashtra :: Block

-- | <tt>U+A8E0..U+A8FF</tt>: Devanagari Extended.
DevanagariExtended :: Block

-- | <tt>U+A900..U+A92F</tt>: Kayah Li.
KayahLi :: Block

-- | <tt>U+A930..U+A95F</tt>: Rejang.
Rejang :: Block

-- | <tt>U+A960..U+A97F</tt>: Hangul Jamo Extended-A.
HangulJamoExtendedA :: Block

-- | <tt>U+A980..U+A9DF</tt>: Javanese.
Javanese :: Block

-- | <tt>U+A9E0..U+A9FF</tt>: Myanmar Extended-B.
MyanmarExtendedB :: Block

-- | <tt>U+AA00..U+AA5F</tt>: Cham.
Cham :: Block

-- | <tt>U+AA60..U+AA7F</tt>: Myanmar Extended-A.
MyanmarExtendedA :: Block

-- | <tt>U+AA80..U+AADF</tt>: Tai Viet.
TaiViet :: Block

-- | <tt>U+AAE0..U+AAFF</tt>: Meetei Mayek Extensions.
MeeteiMayekExtensions :: Block

-- | <tt>U+AB00..U+AB2F</tt>: Ethiopic Extended-A.
EthiopicExtendedA :: Block

-- | <tt>U+AB30..U+AB6F</tt>: Latin Extended-E.
LatinExtendedE :: Block

-- | <tt>U+AB70..U+ABBF</tt>: Cherokee Supplement.
CherokeeSupplement :: Block

-- | <tt>U+ABC0..U+ABFF</tt>: Meetei Mayek.
MeeteiMayek :: Block

-- | <tt>U+AC00..U+D7AF</tt>: Hangul Syllables.
HangulSyllables :: Block

-- | <tt>U+D7B0..U+D7FF</tt>: Hangul Jamo Extended-B.
HangulJamoExtendedB :: Block

-- | <tt>U+D800..U+DB7F</tt>: High Surrogates.
HighSurrogates :: Block

-- | <tt>U+DB80..U+DBFF</tt>: High Private Use Surrogates.
HighPrivateUseSurrogates :: Block

-- | <tt>U+DC00..U+DFFF</tt>: Low Surrogates.
LowSurrogates :: Block

-- | <tt>U+E000..U+F8FF</tt>: Private Use Area.
PrivateUseArea :: Block

-- | <tt>U+F900..U+FAFF</tt>: CJK Compatibility Ideographs.
CJKCompatibilityIdeographs :: Block

-- | <tt>U+FB00..U+FB4F</tt>: Alphabetic Presentation Forms.
AlphabeticPresentationForms :: Block

-- | <tt>U+FB50..U+FDFF</tt>: Arabic Presentation Forms-A.
ArabicPresentationFormsA :: Block

-- | <tt>U+FE00..U+FE0F</tt>: Variation Selectors.
VariationSelectors :: Block

-- | <tt>U+FE10..U+FE1F</tt>: Vertical Forms.
VerticalForms :: Block

-- | <tt>U+FE20..U+FE2F</tt>: Combining Half Marks.
CombiningHalfMarks :: Block

-- | <tt>U+FE30..U+FE4F</tt>: CJK Compatibility Forms.
CJKCompatibilityForms :: Block

-- | <tt>U+FE50..U+FE6F</tt>: Small Form Variants.
SmallFormVariants :: Block

-- | <tt>U+FE70..U+FEFF</tt>: Arabic Presentation Forms-B.
ArabicPresentationFormsB :: Block

-- | <tt>U+FF00..U+FFEF</tt>: Halfwidth and Fullwidth Forms.
HalfwidthAndFullwidthForms :: Block

-- | <tt>U+FFF0..U+FFFF</tt>: Specials.
Specials :: Block

-- | <tt>U+10000..U+1007F</tt>: Linear B Syllabary.
LinearBSyllabary :: Block

-- | <tt>U+10080..U+100FF</tt>: Linear B Ideograms.
LinearBIdeograms :: Block

-- | <tt>U+10100..U+1013F</tt>: Aegean Numbers.
AegeanNumbers :: Block

-- | <tt>U+10140..U+1018F</tt>: Ancient Greek Numbers.
AncientGreekNumbers :: Block

-- | <tt>U+10190..U+101CF</tt>: Ancient Symbols.
AncientSymbols :: Block

-- | <tt>U+101D0..U+101FF</tt>: Phaistos Disc.
PhaistosDisc :: Block

-- | <tt>U+10280..U+1029F</tt>: Lycian.
Lycian :: Block

-- | <tt>U+102A0..U+102DF</tt>: Carian.
Carian :: Block

-- | <tt>U+102E0..U+102FF</tt>: Coptic Epact Numbers.
CopticEpactNumbers :: Block

-- | <tt>U+10300..U+1032F</tt>: Old Italic.
OldItalic :: Block

-- | <tt>U+10330..U+1034F</tt>: Gothic.
Gothic :: Block

-- | <tt>U+10350..U+1037F</tt>: Old Permic.
OldPermic :: Block

-- | <tt>U+10380..U+1039F</tt>: Ugaritic.
Ugaritic :: Block

-- | <tt>U+103A0..U+103DF</tt>: Old Persian.
OldPersian :: Block

-- | <tt>U+10400..U+1044F</tt>: Deseret.
Deseret :: Block

-- | <tt>U+10450..U+1047F</tt>: Shavian.
Shavian :: Block

-- | <tt>U+10480..U+104AF</tt>: Osmanya.
Osmanya :: Block

-- | <tt>U+104B0..U+104FF</tt>: Osage.
Osage :: Block

-- | <tt>U+10500..U+1052F</tt>: Elbasan.
Elbasan :: Block

-- | <tt>U+10530..U+1056F</tt>: Caucasian Albanian.
CaucasianAlbanian :: Block

-- | <tt>U+10570..U+105BF</tt>: Vithkuqi.
Vithkuqi :: Block

-- | <tt>U+10600..U+1077F</tt>: Linear A.
LinearA :: Block

-- | <tt>U+10780..U+107BF</tt>: Latin Extended-F.
LatinExtendedF :: Block

-- | <tt>U+10800..U+1083F</tt>: Cypriot Syllabary.
CypriotSyllabary :: Block

-- | <tt>U+10840..U+1085F</tt>: Imperial Aramaic.
ImperialAramaic :: Block

-- | <tt>U+10860..U+1087F</tt>: Palmyrene.
Palmyrene :: Block

-- | <tt>U+10880..U+108AF</tt>: Nabataean.
Nabataean :: Block

-- | <tt>U+108E0..U+108FF</tt>: Hatran.
Hatran :: Block

-- | <tt>U+10900..U+1091F</tt>: Phoenician.
Phoenician :: Block

-- | <tt>U+10920..U+1093F</tt>: Lydian.
Lydian :: Block

-- | <tt>U+10980..U+1099F</tt>: Meroitic Hieroglyphs.
MeroiticHieroglyphs :: Block

-- | <tt>U+109A0..U+109FF</tt>: Meroitic Cursive.
MeroiticCursive :: Block

-- | <tt>U+10A00..U+10A5F</tt>: Kharoshthi.
Kharoshthi :: Block

-- | <tt>U+10A60..U+10A7F</tt>: Old South Arabian.
OldSouthArabian :: Block

-- | <tt>U+10A80..U+10A9F</tt>: Old North Arabian.
OldNorthArabian :: Block

-- | <tt>U+10AC0..U+10AFF</tt>: Manichaean.
Manichaean :: Block

-- | <tt>U+10B00..U+10B3F</tt>: Avestan.
Avestan :: Block

-- | <tt>U+10B40..U+10B5F</tt>: Inscriptional Parthian.
InscriptionalParthian :: Block

-- | <tt>U+10B60..U+10B7F</tt>: Inscriptional Pahlavi.
InscriptionalPahlavi :: Block

-- | <tt>U+10B80..U+10BAF</tt>: Psalter Pahlavi.
PsalterPahlavi :: Block

-- | <tt>U+10C00..U+10C4F</tt>: Old Turkic.
OldTurkic :: Block

-- | <tt>U+10C80..U+10CFF</tt>: Old Hungarian.
OldHungarian :: Block

-- | <tt>U+10D00..U+10D3F</tt>: Hanifi Rohingya.
HanifiRohingya :: Block

-- | <tt>U+10E60..U+10E7F</tt>: Rumi Numeral Symbols.
RumiNumeralSymbols :: Block

-- | <tt>U+10E80..U+10EBF</tt>: Yezidi.
Yezidi :: Block

-- | <tt>U+10EC0..U+10EFF</tt>: Arabic Extended-C.
ArabicExtendedC :: Block

-- | <tt>U+10F00..U+10F2F</tt>: Old Sogdian.
OldSogdian :: Block

-- | <tt>U+10F30..U+10F6F</tt>: Sogdian.
Sogdian :: Block

-- | <tt>U+10F70..U+10FAF</tt>: Old Uyghur.
OldUyghur :: Block

-- | <tt>U+10FB0..U+10FDF</tt>: Chorasmian.
Chorasmian :: Block

-- | <tt>U+10FE0..U+10FFF</tt>: Elymaic.
Elymaic :: Block

-- | <tt>U+11000..U+1107F</tt>: Brahmi.
Brahmi :: Block

-- | <tt>U+11080..U+110CF</tt>: Kaithi.
Kaithi :: Block

-- | <tt>U+110D0..U+110FF</tt>: Sora Sompeng.
SoraSompeng :: Block

-- | <tt>U+11100..U+1114F</tt>: Chakma.
Chakma :: Block

-- | <tt>U+11150..U+1117F</tt>: Mahajani.
Mahajani :: Block

-- | <tt>U+11180..U+111DF</tt>: Sharada.
Sharada :: Block

-- | <tt>U+111E0..U+111FF</tt>: Sinhala Archaic Numbers.
SinhalaArchaicNumbers :: Block

-- | <tt>U+11200..U+1124F</tt>: Khojki.
Khojki :: Block

-- | <tt>U+11280..U+112AF</tt>: Multani.
Multani :: Block

-- | <tt>U+112B0..U+112FF</tt>: Khudawadi.
Khudawadi :: Block

-- | <tt>U+11300..U+1137F</tt>: Grantha.
Grantha :: Block

-- | <tt>U+11400..U+1147F</tt>: Newa.
Newa :: Block

-- | <tt>U+11480..U+114DF</tt>: Tirhuta.
Tirhuta :: Block

-- | <tt>U+11580..U+115FF</tt>: Siddham.
Siddham :: Block

-- | <tt>U+11600..U+1165F</tt>: Modi.
Modi :: Block

-- | <tt>U+11660..U+1167F</tt>: Mongolian Supplement.
MongolianSupplement :: Block

-- | <tt>U+11680..U+116CF</tt>: Takri.
Takri :: Block

-- | <tt>U+11700..U+1174F</tt>: Ahom.
Ahom :: Block

-- | <tt>U+11800..U+1184F</tt>: Dogra.
Dogra :: Block

-- | <tt>U+118A0..U+118FF</tt>: Warang Citi.
WarangCiti :: Block

-- | <tt>U+11900..U+1195F</tt>: Dives Akuru.
DivesAkuru :: Block

-- | <tt>U+119A0..U+119FF</tt>: Nandinagari.
Nandinagari :: Block

-- | <tt>U+11A00..U+11A4F</tt>: Zanabazar Square.
ZanabazarSquare :: Block

-- | <tt>U+11A50..U+11AAF</tt>: Soyombo.
Soyombo :: Block

-- | <tt>U+11AB0..U+11ABF</tt>: Unified Canadian Aboriginal Syllabics
--   Extended-A.
UnifiedCanadianAboriginalSyllabicsExtendedA :: Block

-- | <tt>U+11AC0..U+11AFF</tt>: Pau Cin Hau.
PauCinHau :: Block

-- | <tt>U+11B00..U+11B5F</tt>: Devanagari Extended-A.
DevanagariExtendedA :: Block

-- | <tt>U+11C00..U+11C6F</tt>: Bhaiksuki.
Bhaiksuki :: Block

-- | <tt>U+11C70..U+11CBF</tt>: Marchen.
Marchen :: Block

-- | <tt>U+11D00..U+11D5F</tt>: Masaram Gondi.
MasaramGondi :: Block

-- | <tt>U+11D60..U+11DAF</tt>: Gunjala Gondi.
GunjalaGondi :: Block

-- | <tt>U+11EE0..U+11EFF</tt>: Makasar.
Makasar :: Block

-- | <tt>U+11F00..U+11F5F</tt>: Kawi.
Kawi :: Block

-- | <tt>U+11FB0..U+11FBF</tt>: Lisu Supplement.
LisuSupplement :: Block

-- | <tt>U+11FC0..U+11FFF</tt>: Tamil Supplement.
TamilSupplement :: Block

-- | <tt>U+12000..U+123FF</tt>: Cuneiform.
Cuneiform :: Block

-- | <tt>U+12400..U+1247F</tt>: Cuneiform Numbers and Punctuation.
CuneiformNumbersAndPunctuation :: Block

-- | <tt>U+12480..U+1254F</tt>: Early Dynastic Cuneiform.
EarlyDynasticCuneiform :: Block

-- | <tt>U+12F90..U+12FFF</tt>: Cypro-Minoan.
CyproMinoan :: Block

-- | <tt>U+13000..U+1342F</tt>: Egyptian Hieroglyphs.
EgyptianHieroglyphs :: Block

-- | <tt>U+13430..U+1345F</tt>: Egyptian Hieroglyph Format Controls.
EgyptianHieroglyphFormatControls :: Block

-- | <tt>U+14400..U+1467F</tt>: Anatolian Hieroglyphs.
AnatolianHieroglyphs :: Block

-- | <tt>U+16800..U+16A3F</tt>: Bamum Supplement.
BamumSupplement :: Block

-- | <tt>U+16A40..U+16A6F</tt>: Mro.
Mro :: Block

-- | <tt>U+16A70..U+16ACF</tt>: Tangsa.
Tangsa :: Block

-- | <tt>U+16AD0..U+16AFF</tt>: Bassa Vah.
BassaVah :: Block

-- | <tt>U+16B00..U+16B8F</tt>: Pahawh Hmong.
PahawhHmong :: Block

-- | <tt>U+16E40..U+16E9F</tt>: Medefaidrin.
Medefaidrin :: Block

-- | <tt>U+16F00..U+16F9F</tt>: Miao.
Miao :: Block

-- | <tt>U+16FE0..U+16FFF</tt>: Ideographic Symbols and Punctuation.
IdeographicSymbolsAndPunctuation :: Block

-- | <tt>U+17000..U+187FF</tt>: Tangut.
Tangut :: Block

-- | <tt>U+18800..U+18AFF</tt>: Tangut Components.
TangutComponents :: Block

-- | <tt>U+18B00..U+18CFF</tt>: Khitan Small Script.
KhitanSmallScript :: Block

-- | <tt>U+18D00..U+18D7F</tt>: Tangut Supplement.
TangutSupplement :: Block

-- | <tt>U+1AFF0..U+1AFFF</tt>: Kana Extended-B.
KanaExtendedB :: Block

-- | <tt>U+1B000..U+1B0FF</tt>: Kana Supplement.
KanaSupplement :: Block

-- | <tt>U+1B100..U+1B12F</tt>: Kana Extended-A.
KanaExtendedA :: Block

-- | <tt>U+1B130..U+1B16F</tt>: Small Kana Extension.
SmallKanaExtension :: Block

-- | <tt>U+1B170..U+1B2FF</tt>: Nushu.
Nushu :: Block

-- | <tt>U+1BC00..U+1BC9F</tt>: Duployan.
Duployan :: Block

-- | <tt>U+1BCA0..U+1BCAF</tt>: Shorthand Format Controls.
ShorthandFormatControls :: Block

-- | <tt>U+1CF00..U+1CFCF</tt>: Znamenny Musical Notation.
ZnamennyMusicalNotation :: Block

-- | <tt>U+1D000..U+1D0FF</tt>: Byzantine Musical Symbols.
ByzantineMusicalSymbols :: Block

-- | <tt>U+1D100..U+1D1FF</tt>: Musical Symbols.
MusicalSymbols :: Block

-- | <tt>U+1D200..U+1D24F</tt>: Ancient Greek Musical Notation.
AncientGreekMusicalNotation :: Block

-- | <tt>U+1D2C0..U+1D2DF</tt>: Kaktovik Numerals.
KaktovikNumerals :: Block

-- | <tt>U+1D2E0..U+1D2FF</tt>: Mayan Numerals.
MayanNumerals :: Block

-- | <tt>U+1D300..U+1D35F</tt>: Tai Xuan Jing Symbols.
TaiXuanJingSymbols :: Block

-- | <tt>U+1D360..U+1D37F</tt>: Counting Rod Numerals.
CountingRodNumerals :: Block

-- | <tt>U+1D400..U+1D7FF</tt>: Mathematical Alphanumeric Symbols.
MathematicalAlphanumericSymbols :: Block

-- | <tt>U+1D800..U+1DAAF</tt>: Sutton SignWriting.
SuttonSignWriting :: Block

-- | <tt>U+1DF00..U+1DFFF</tt>: Latin Extended-G.
LatinExtendedG :: Block

-- | <tt>U+1E000..U+1E02F</tt>: Glagolitic Supplement.
GlagoliticSupplement :: Block

-- | <tt>U+1E030..U+1E08F</tt>: Cyrillic Extended-D.
CyrillicExtendedD :: Block

-- | <tt>U+1E100..U+1E14F</tt>: Nyiakeng Puachue Hmong.
NyiakengPuachueHmong :: Block

-- | <tt>U+1E290..U+1E2BF</tt>: Toto.
Toto :: Block

-- | <tt>U+1E2C0..U+1E2FF</tt>: Wancho.
Wancho :: Block

-- | <tt>U+1E4D0..U+1E4FF</tt>: Nag Mundari.
NagMundari :: Block

-- | <tt>U+1E7E0..U+1E7FF</tt>: Ethiopic Extended-B.
EthiopicExtendedB :: Block

-- | <tt>U+1E800..U+1E8DF</tt>: Mende Kikakui.
MendeKikakui :: Block

-- | <tt>U+1E900..U+1E95F</tt>: Adlam.
Adlam :: Block

-- | <tt>U+1EC70..U+1ECBF</tt>: Indic Siyaq Numbers.
IndicSiyaqNumbers :: Block

-- | <tt>U+1ED00..U+1ED4F</tt>: Ottoman Siyaq Numbers.
OttomanSiyaqNumbers :: Block

-- | <tt>U+1EE00..U+1EEFF</tt>: Arabic Mathematical Alphabetic Symbols.
ArabicMathematicalAlphabeticSymbols :: Block

-- | <tt>U+1F000..U+1F02F</tt>: Mahjong Tiles.
MahjongTiles :: Block

-- | <tt>U+1F030..U+1F09F</tt>: Domino Tiles.
DominoTiles :: Block

-- | <tt>U+1F0A0..U+1F0FF</tt>: Playing Cards.
PlayingCards :: Block

-- | <tt>U+1F100..U+1F1FF</tt>: Enclosed Alphanumeric Supplement.
EnclosedAlphanumericSupplement :: Block

-- | <tt>U+1F200..U+1F2FF</tt>: Enclosed Ideographic Supplement.
EnclosedIdeographicSupplement :: Block

-- | <tt>U+1F300..U+1F5FF</tt>: Miscellaneous Symbols and Pictographs.
MiscellaneousSymbolsAndPictographs :: Block

-- | <tt>U+1F600..U+1F64F</tt>: Emoticons.
Emoticons :: Block

-- | <tt>U+1F650..U+1F67F</tt>: Ornamental Dingbats.
OrnamentalDingbats :: Block

-- | <tt>U+1F680..U+1F6FF</tt>: Transport and Map Symbols.
TransportAndMapSymbols :: Block

-- | <tt>U+1F700..U+1F77F</tt>: Alchemical Symbols.
AlchemicalSymbols :: Block

-- | <tt>U+1F780..U+1F7FF</tt>: Geometric Shapes Extended.
GeometricShapesExtended :: Block

-- | <tt>U+1F800..U+1F8FF</tt>: Supplemental Arrows-C.
SupplementalArrowsC :: Block

-- | <tt>U+1F900..U+1F9FF</tt>: Supplemental Symbols and Pictographs.
SupplementalSymbolsAndPictographs :: Block

-- | <tt>U+1FA00..U+1FA6F</tt>: Chess Symbols.
ChessSymbols :: Block

-- | <tt>U+1FA70..U+1FAFF</tt>: Symbols and Pictographs Extended-A.
SymbolsAndPictographsExtendedA :: Block

-- | <tt>U+1FB00..U+1FBFF</tt>: Symbols for Legacy Computing.
SymbolsForLegacyComputing :: Block

-- | <tt>U+20000..U+2A6DF</tt>: CJK Unified Ideographs Extension B.
CJKUnifiedIdeographsExtensionB :: Block

-- | <tt>U+2A700..U+2B73F</tt>: CJK Unified Ideographs Extension C.
CJKUnifiedIdeographsExtensionC :: Block

-- | <tt>U+2B740..U+2B81F</tt>: CJK Unified Ideographs Extension D.
CJKUnifiedIdeographsExtensionD :: Block

-- | <tt>U+2B820..U+2CEAF</tt>: CJK Unified Ideographs Extension E.
CJKUnifiedIdeographsExtensionE :: Block

-- | <tt>U+2CEB0..U+2EBEF</tt>: CJK Unified Ideographs Extension F.
CJKUnifiedIdeographsExtensionF :: Block

-- | <tt>U+2F800..U+2FA1F</tt>: CJK Compatibility Ideographs Supplement.
CJKCompatibilityIdeographsSupplement :: Block

-- | <tt>U+30000..U+3134F</tt>: CJK Unified Ideographs Extension G.
CJKUnifiedIdeographsExtensionG :: Block

-- | <tt>U+31350..U+323AF</tt>: CJK Unified Ideographs Extension H.
CJKUnifiedIdeographsExtensionH :: Block

-- | <tt>U+E0000..U+E007F</tt>: Tags.
Tags :: Block

-- | <tt>U+E0100..U+E01EF</tt>: Variation Selectors Supplement.
VariationSelectorsSupplement :: Block

-- | <tt>U+F0000..U+FFFFF</tt>: Supplementary Private Use Area-A.
SupplementaryPrivateUseAreaA :: Block

-- | <tt>U+100000..U+10FFFF</tt>: Supplementary Private Use Area-B.
SupplementaryPrivateUseAreaB :: Block

-- | Block definition: range and name.
data BlockDefinition
BlockDefinition :: !(Int, Int) -> !String -> BlockDefinition

-- | Range
[blockRange] :: BlockDefinition -> !(Int, Int)

-- | Name
[blockName] :: BlockDefinition -> !String

-- | Character <a>block</a>, if defined.
block :: Char -> Maybe Block

-- | Block definition
blockDefinition :: Block -> BlockDefinition


-- | 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


-- | 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 <a>Unicode Character Database</a>,
--   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><a>isAlpha</a> 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.
--   
--   <b>Note:</b> this function requires a precomposed Hangul syllable but
--   does <i>not</i> check it. Use <a>isHangul</a> to check the input
--   character before passing it to <a>isHangulLV</a>.
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


-- | Compatibility module for numeric character property related functions.
module Unicode.Char.Numeric.Compat

-- | 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>
--   
--   <b>Note:</b> a character may have a numeric value (see
--   <a>numericValue</a>) but return <a>False</a>, because <a>isNumber</a>
--   only tests <a>GeneralCategory</a>: some CJK characters are
--   <a>OtherLetter</a> and do have a numeric value. Use <a>isNumeric</a>
--   to cover those cases as well.
--   
--   <pre>
--   isNumber c == Data.Char.isNumber c
--   </pre>
--   
--   @since 0.3.1 moved to Compat module.
isNumber :: Char -> Bool


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

-- | Selects Unicode character with a numeric value.
--   
--   <b>Note:</b> a character may have a numeric value but return
--   <a>False</a> with the predicate <a>isNumber</a>, because
--   <a>isNumber</a> only tests <a>GeneralCategory</a>: some CJK characters
--   are <a>OtherLetter</a> and do have a numeric value.
--   
--   <pre>
--   isNumeric c == isJust (numericValue c)
--   </pre>
isNumeric :: Char -> Bool

-- | 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>
--   
--   <b>Note:</b> a character may have a numeric value (see
--   <a>numericValue</a>) but return <a>False</a>, because <a>isNumber</a>
--   only tests <a>GeneralCategory</a>: some CJK characters are
--   <a>OtherLetter</a> and do have a numeric value. Use <a>isNumeric</a>
--   to cover those cases as well.
--   
--   <pre>
--   isNumber c == Data.Char.isNumber c
--   </pre>

-- | <i>Deprecated: Use Unicode.Char.Numeric.Compat.isNumber instead. This
--   function will be a synonym for isNumeric in a future release. See
--   Unicode.Char.Numeric.Compat for behavior compatible with
--   base:Data.Char.</i>
isNumber :: Char -> Bool

-- | Numeric value of a character, if relevant.
--   
--   <b>Note:</b> a character may have a numeric value but return
--   <a>False</a> with the predicate <a>isNumber</a>, because
--   <a>isNumber</a> only tests <a>GeneralCategory</a>: some CJK characters
--   are <a>OtherLetter</a> and do have a numeric value.
numericValue :: Char -> Maybe Rational

-- | Integer value of a character, if relevant.
--   
--   This is a special case of <a>numericValue</a>.
--   
--   <b>Note:</b> a character may have a numeric value but return
--   <a>False</a> with the predicate <a>isNumber</a>, because
--   <a>isNumber</a> only tests <a>GeneralCategory</a>: some CJK characters
--   are <a>OtherLetter</a> and do have a numeric value.
integerValue :: Char -> Maybe Int

-- | 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>.
--   
--   It matches characters with general category <a>UppercaseLetter</a> and
--   <a>TitlecaseLetter</a>.
--   
--   See: <a>isUpperCase</a> for the <i>full upper</i> case predicate.
--   
--   <pre>
--   isUpper c == Data.Char.isUpper c
--   </pre>
isUpper :: Char -> Bool

-- | Selects lower-case alphabetic Unicode characters (letters).
--   
--   It matches characters with general category <a>LowercaseLetter</a>.
--   
--   See: <a>isLowerCase</a> for the <i>full</i> lower case predicate.
--   
--   <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.
--   
--   It uses the character property <tt>Simple_Uppercase_Mapping</tt>.
--   
--   See: <a>upperCaseMapping</a> and <a>toUpperString</a> for <i>full</i>
--   upper case conversion.
--   
--   <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.
--   
--   It uses the character property <tt>Simple_Lowercase_Mapping</tt>.
--   
--   See: <a>lowerCaseMapping</a> and <a>toLowerString</a> for <i>full</i>
--   lower case conversion.
--   
--   <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.
--   
--   It uses the character property <tt>Simple_Titlecase_Mapping</tt>.
--   
--   See: <a>titleCaseMapping</a> and <a>toTitleString</a> for <i>full</i>
--   title case conversion.
--   
--   <pre>
--   toTitle c == Data.Char.toTitle c
--   </pre>
toTitle :: Char -> Char


module Unicode.Internal.Unfold

-- | An <tt>Unfold a b</tt> is a generator of a stream of values of type
--   <tt>b</tt> from a seed of type <tt>a</tt>.
data Unfold a b
Unfold :: (s -> Step s b) -> (a -> Step s b) -> Unfold a b

-- | A stream is a succession of <a>Step</a>s.
data Step s a

-- | Produces a single value and the next state of the stream.
Yield :: !a -> !s -> Step s a

-- | Indicates there are no more values in the stream.
Stop :: Step s a

-- | Convert an 'Unfold a a' to a list [a], if the resulting list is empty
--   the seed is used as a default output.
toList :: Unfold a a -> a -> [a]
instance GHC.Base.Functor (Unicode.Internal.Unfold.Step s)


-- | Case and case mapping related functions.
--   
--   This module provides <i>full</i> predicates and mappings that are
--   <i>not</i> compatible with those in <a>Data.Char</a>, which rely on
--   simple properties. See <a>Unicode.Char.Case.Compat</a> for a drop-in
--   replacement of the functions in <a>Data.Char</a>.
module Unicode.Char.Case

-- | Returns <a>True</a> for lower-case characters.
--   
--   It uses the character property <a>Lowercase</a>.
isLowerCase :: Char -> Bool

-- | Returns <a>True</a> for lower-case characters.
--   
--   It uses the character property <a>Lowercase</a>.

-- | <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 characters.
--   
--   It uses the character property <a>Uppercase</a>.
--   
--   Note: it does <i>not</i> match title-cased letters. Those are matched
--   using: <tt><a>generalCategory</a> c == <a>TitlecaseLetter</a></tt>.
isUpperCase :: Char -> Bool

-- | Returns <a>True</a> for upper-case characters.
--   
--   It uses the character property <a>Uppercase</a>.
--   
--   Note: it does <i>not</i> match title-cased letters. Those are matched
--   using: <tt><a>generalCategory</a> c == <a>TitlecaseLetter</a></tt>.

-- | <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

-- | Returns the full <i>folded</i> case mapping of a character if the
--   character is changed, else nothing.
--   
--   It uses the character property <tt>Case_Folding</tt>.
caseFoldMapping :: Unfold Char Char

-- | Convert a character to full <i>folded</i> case if defined, else to
--   itself.
--   
--   This function is mainly useful for performing caseless (also known as
--   case insensitive) string comparisons.
--   
--   A string <tt>x</tt> is a caseless match for a string <tt>y</tt> if and
--   only if:
--   
--   <pre>
--   foldMap toCaseFoldString x == foldMap toCaseFoldString y
--   </pre>
--   
--   The result string may have more than one character, and may differ
--   from applying <a>toLowerString</a> to the input string. For instance,
--   “ﬓ” (<tt>U+FB13</tt> Armenian small ligature men now) is case folded
--   to the sequence “մ” (<tt>U+0574</tt> Armenian small letter men)
--   followed by “ն” (<tt>U+0576</tt> Armenian small letter now), while “µ”
--   (<tt>U+00B5</tt> micro sign) is case folded to “μ” (<tt>U+03BC</tt>
--   Greek small letter mu) instead of itself.
--   
--   It uses the character property <tt>Case_Folding</tt>.
--   
--   <pre>
--   toCaseFoldString c == foldMap toCaseFoldString (toCaseFoldString c)
--   </pre>
toCaseFoldString :: Char -> String

-- | Returns the full <i>lower</i> case mapping of a character if the
--   character is changed, else nothing.
--   
--   It uses the character property <tt>Lowercase_Mapping</tt>.
lowerCaseMapping :: Unfold Char Char

-- | Convert a character to full <i>lower</i> case if defined, else to
--   itself.
--   
--   The result string may have more than one character. For instance, “İ”
--   (<tt>U+0130</tt> Latin capital letter I with dot above) maps to the
--   sequence: “i” (<tt>U+0069</tt> Latin small letter I) followed by “ ̇”
--   (<tt>U+0307</tt> combining dot above).
--   
--   It uses the character property <tt>Lowercase_Mapping</tt>.
--   
--   See: <a>toLower</a> for <i>simple</i> lower case conversion.
--   
--   <pre>
--   toLowerString c == foldMap toLowerString (toLowerString c)
--   </pre>
toLowerString :: Char -> String

-- | Returns the full <i>title</i> case mapping of a character if the
--   character is changed, else nothing.
--   
--   It uses the character property <tt>Titlecase_Mapping</tt>.
titleCaseMapping :: Unfold Char Char

-- | Convert a character to full <i>title</i> case if defined, else to
--   itself.
--   
--   The result string may have more than one character. For instance, “ﬂ”
--   (<tt>U+FB02</tt> Latin small ligature FL) is converted to the
--   sequence: “F” (<tt>U+0046</tt> Latin capital letter F) followed by “l”
--   (<tt>U+006C</tt> Latin small letter L).
--   
--   It uses the character property <tt>Titlecase_Mapping</tt>.
--   
--   See: <a>toTitle</a> for <i>simple</i> title case conversion.
toTitleString :: Char -> String

-- | Returns the full <i>upper</i> case mapping of a character if the
--   character is changed, else nothing.
--   
--   It uses the character property <tt>Uppercase_Mapping</tt>.
upperCaseMapping :: Unfold Char Char

-- | Convert a character to full <i>upper</i> case if defined, else to
--   itself.
--   
--   The result string may have more than one character. For instance, the
--   German “ß” (<tt>U+00DF</tt> Eszett) maps to the two-letter sequence
--   “SS”.
--   
--   It uses the character property <tt>Uppercase_Mapping</tt>.
--   
--   See: <a>toUpper</a> for <i>simple</i> upper case conversion.
--   
--   <pre>
--   toUpperString c == foldMap toUpperString (toUpperString c)
--   </pre>
toUpperString :: Char -> String

-- | An <tt>Unfold a b</tt> is a generator of a stream of values of type
--   <tt>b</tt> from a seed of type <tt>a</tt>.
data Unfold a b
Unfold :: (s -> Step s b) -> (a -> Step s b) -> Unfold a b

-- | A stream is a succession of <a>Step</a>s.
data Step s a

-- | Produces a single value and the next state of the stream.
Yield :: !a -> !s -> Step s a

-- | Indicates there are no more values in the stream.
Stop :: Step s a


-- | This module provides APIs to access the Unicode character database
--   (UCD) corresponding to <a>Unicode Standard version 15.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

-- | Returns <a>True</a> for upper-case characters.
--   
--   It uses the character property <a>Uppercase</a>.
--   
--   Note: it does <i>not</i> match title-cased letters. Those are matched
--   using: <tt><a>generalCategory</a> c == <a>TitlecaseLetter</a></tt>.

-- | <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

-- | Returns <a>True</a> for upper-case characters.
--   
--   It uses the character property <a>Uppercase</a>.
--   
--   Note: it does <i>not</i> match title-cased letters. Those are matched
--   using: <tt><a>generalCategory</a> c == <a>TitlecaseLetter</a></tt>.
isUpperCase :: Char -> Bool

-- | Returns <a>True</a> for lower-case characters.
--   
--   It uses the character property <a>Lowercase</a>.

-- | <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 lower-case characters.
--   
--   It uses the character property <a>Lowercase</a>.
isLowerCase :: Char -> Bool

-- | Returns the full <i>folded</i> case mapping of a character if the
--   character is changed, else nothing.
--   
--   It uses the character property <tt>Case_Folding</tt>.
caseFoldMapping :: Unfold Char Char

-- | Convert a character to full <i>folded</i> case if defined, else to
--   itself.
--   
--   This function is mainly useful for performing caseless (also known as
--   case insensitive) string comparisons.
--   
--   A string <tt>x</tt> is a caseless match for a string <tt>y</tt> if and
--   only if:
--   
--   <pre>
--   foldMap toCaseFoldString x == foldMap toCaseFoldString y
--   </pre>
--   
--   The result string may have more than one character, and may differ
--   from applying <a>toLowerString</a> to the input string. For instance,
--   “ﬓ” (<tt>U+FB13</tt> Armenian small ligature men now) is case folded
--   to the sequence “մ” (<tt>U+0574</tt> Armenian small letter men)
--   followed by “ն” (<tt>U+0576</tt> Armenian small letter now), while “µ”
--   (<tt>U+00B5</tt> micro sign) is case folded to “μ” (<tt>U+03BC</tt>
--   Greek small letter mu) instead of itself.
--   
--   It uses the character property <tt>Case_Folding</tt>.
--   
--   <pre>
--   toCaseFoldString c == foldMap toCaseFoldString (toCaseFoldString c)
--   </pre>
toCaseFoldString :: Char -> String

-- | Returns the full <i>lower</i> case mapping of a character if the
--   character is changed, else nothing.
--   
--   It uses the character property <tt>Lowercase_Mapping</tt>.
lowerCaseMapping :: Unfold Char Char

-- | Convert a character to full <i>lower</i> case if defined, else to
--   itself.
--   
--   The result string may have more than one character. For instance, “İ”
--   (<tt>U+0130</tt> Latin capital letter I with dot above) maps to the
--   sequence: “i” (<tt>U+0069</tt> Latin small letter I) followed by “ ̇”
--   (<tt>U+0307</tt> combining dot above).
--   
--   It uses the character property <tt>Lowercase_Mapping</tt>.
--   
--   See: <a>toLower</a> for <i>simple</i> lower case conversion.
--   
--   <pre>
--   toLowerString c == foldMap toLowerString (toLowerString c)
--   </pre>
toLowerString :: Char -> String

-- | Returns the full <i>title</i> case mapping of a character if the
--   character is changed, else nothing.
--   
--   It uses the character property <tt>Titlecase_Mapping</tt>.
titleCaseMapping :: Unfold Char Char

-- | Convert a character to full <i>title</i> case if defined, else to
--   itself.
--   
--   The result string may have more than one character. For instance, “ﬂ”
--   (<tt>U+FB02</tt> Latin small ligature FL) is converted to the
--   sequence: “F” (<tt>U+0046</tt> Latin capital letter F) followed by “l”
--   (<tt>U+006C</tt> Latin small letter L).
--   
--   It uses the character property <tt>Titlecase_Mapping</tt>.
--   
--   See: <a>toTitle</a> for <i>simple</i> title case conversion.
toTitleString :: Char -> String

-- | Returns the full <i>upper</i> case mapping of a character if the
--   character is changed, else nothing.
--   
--   It uses the character property <tt>Uppercase_Mapping</tt>.
upperCaseMapping :: Unfold Char Char

-- | Convert a character to full <i>upper</i> case if defined, else to
--   itself.
--   
--   The result string may have more than one character. For instance, the
--   German “ß” (<tt>U+00DF</tt> Eszett) maps to the two-letter sequence
--   “SS”.
--   
--   It uses the character property <tt>Uppercase_Mapping</tt>.
--   
--   See: <a>toUpper</a> for <i>simple</i> upper case conversion.
--   
--   <pre>
--   toUpperString c == foldMap toUpperString (toUpperString c)
--   </pre>
toUpperString :: Char -> String

-- | Convert a letter to the corresponding upper-case letter, if any. Any
--   other character is returned unchanged.
--   
--   It uses the character property <tt>Simple_Uppercase_Mapping</tt>.
--   
--   See: <a>upperCaseMapping</a> and <a>toUpperString</a> for <i>full</i>
--   upper case conversion.
--   
--   <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.
--   
--   It uses the character property <tt>Simple_Lowercase_Mapping</tt>.
--   
--   See: <a>lowerCaseMapping</a> and <a>toLowerString</a> for <i>full</i>
--   lower case conversion.
--   
--   <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.
--   
--   It uses the character property <tt>Simple_Titlecase_Mapping</tt>.
--   
--   See: <a>titleCaseMapping</a> and <a>toTitleString</a> for <i>full</i>
--   title case conversion.
--   
--   <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
