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

-- | Bindings to the ICU library
--   
--   Haskell bindings to the International Components for Unicode (ICU)
--   libraries. These libraries provide robust and full-featured Unicode
--   services on a wide variety of platforms.
--   
--   Features include:
--   
--   
--   
- Both pure and impure bindings, to allow for fine control over
--   efficiency and ease of use.
--   
- Breaking of strings on character, word, sentence, and line
--   boundaries.
--   
- Access to the Unicode Character Database (UCD) of character
--   metadata.
--   
- String collation functions, for locales where the conventions for
--   lexicographic ordering differ from the simple numeric ordering of
--   character codes.
--   
- Character set conversion functions, allowing conversion between
--   Unicode and over 220 character encodings.
--   
- Unicode normalization. (When implementations keep strings in a
--   normalized form, they can be assured that equivalent strings have a
--   unique binary representation.)
--   
- Regular expression search and replace.
--   
- Security checks for visually confusable (spoofable) strings.
--   
- Bidirectional Unicode algorithm
--   
- Calendar objects holding dates and times.
--   
- Number and calendar formatting.
--   
@package text-icu
@version 0.8.0.5

-- | Errors thrown by bindings to the International Components for Unicode
--   (ICU) libraries.
--   
--   Most ICU functions can throw an ICUError value as an exception.
--   Some can additionally throw a ParseError, if more detailed
--   error information is necessary.
module Data.Text.ICU.Error

-- | ICU error type. This is an instance of the Exception type
--   class. A value of this type may be thrown as an exception by most ICU
--   functions.
data ICUError

-- | Detailed information about parsing errors. Used by ICU parsing engines
--   that parse long rules, patterns, or programs, where the text being
--   parsed is long enough that more information than an ICUError is
--   needed to localize the error.
data ParseError

-- | Indicate whether the given error code is a success.
isSuccess :: ICUError -> Bool

-- | Indicate whether the given error code is a failure.
isFailure :: ICUError -> Bool

-- | Return a string representing the name of the given error code.
errorName :: ICUError -> String
isRegexError :: ICUError -> Bool
u_USING_FALLBACK_WARNING :: ICUError
u_USING_DEFAULT_WARNING :: ICUError
u_SAFECLONE_ALLOCATED_WARNING :: ICUError
u_STATE_OLD_WARNING :: ICUError
u_STRING_NOT_TERMINATED_WARNING :: ICUError
u_SORT_KEY_TOO_SHORT_WARNING :: ICUError
u_AMBIGUOUS_ALIAS_WARNING :: ICUError
u_DIFFERENT_UCA_VERSION :: ICUError
u_ILLEGAL_ARGUMENT_ERROR :: ICUError
u_MISSING_RESOURCE_ERROR :: ICUError
u_INVALID_FORMAT_ERROR :: ICUError
u_FILE_ACCESS_ERROR :: ICUError
u_INTERNAL_PROGRAM_ERROR :: ICUError
u_MESSAGE_PARSE_ERROR :: ICUError
u_MEMORY_ALLOCATION_ERROR :: ICUError
u_INDEX_OUTOFBOUNDS_ERROR :: ICUError
u_PARSE_ERROR :: ICUError
u_INVALID_CHAR_FOUND :: ICUError
u_TRUNCATED_CHAR_FOUND :: ICUError
u_ILLEGAL_CHAR_FOUND :: ICUError
u_INVALID_TABLE_FORMAT :: ICUError
u_INVALID_TABLE_FILE :: ICUError
u_BUFFER_OVERFLOW_ERROR :: ICUError
u_UNSUPPORTED_ERROR :: ICUError
u_RESOURCE_TYPE_MISMATCH :: ICUError
u_ILLEGAL_ESCAPE_SEQUENCE :: ICUError
u_UNSUPPORTED_ESCAPE_SEQUENCE :: ICUError
u_NO_SPACE_AVAILABLE :: ICUError
u_CE_NOT_FOUND_ERROR :: ICUError
u_PRIMARY_TOO_LONG_ERROR :: ICUError
u_STATE_TOO_OLD_ERROR :: ICUError
u_TOO_MANY_ALIASES_ERROR :: ICUError
u_ENUM_OUT_OF_SYNC_ERROR :: ICUError
u_INVARIANT_CONVERSION_ERROR :: ICUError
u_INVALID_STATE_ERROR :: ICUError
u_COLLATOR_VERSION_MISMATCH :: ICUError
u_USELESS_COLLATOR_ERROR :: ICUError
u_NO_WRITE_PERMISSION :: ICUError
u_BAD_VARIABLE_DEFINITION :: ICUError
u_MALFORMED_RULE :: ICUError
u_MALFORMED_SET :: ICUError
u_MALFORMED_UNICODE_ESCAPE :: ICUError
u_MALFORMED_VARIABLE_DEFINITION :: ICUError
u_MALFORMED_VARIABLE_REFERENCE :: ICUError
u_MISPLACED_CURSOR_OFFSET :: ICUError
u_MISPLACED_QUANTIFIER :: ICUError
u_MISSING_OPERATOR :: ICUError
u_MULTIPLE_ANTE_CONTEXTS :: ICUError
u_MULTIPLE_CURSORS :: ICUError
u_MULTIPLE_POST_CONTEXTS :: ICUError
u_TRAILING_BACKSLASH :: ICUError
u_UNDEFINED_SEGMENT_REFERENCE :: ICUError
u_UNDEFINED_VARIABLE :: ICUError
u_UNQUOTED_SPECIAL :: ICUError
u_UNTERMINATED_QUOTE :: ICUError
u_RULE_MASK_ERROR :: ICUError
u_MISPLACED_COMPOUND_FILTER :: ICUError
u_MULTIPLE_COMPOUND_FILTERS :: ICUError
u_INVALID_RBT_SYNTAX :: ICUError
u_MALFORMED_PRAGMA :: ICUError
u_UNCLOSED_SEGMENT :: ICUError
u_VARIABLE_RANGE_EXHAUSTED :: ICUError
u_VARIABLE_RANGE_OVERLAP :: ICUError
u_ILLEGAL_CHARACTER :: ICUError
u_INTERNAL_TRANSLITERATOR_ERROR :: ICUError
u_INVALID_ID :: ICUError
u_INVALID_FUNCTION :: ICUError
u_UNEXPECTED_TOKEN :: ICUError
u_MULTIPLE_DECIMAL_SEPARATORS :: ICUError
u_MULTIPLE_EXPONENTIAL_SYMBOLS :: ICUError
u_MALFORMED_EXPONENTIAL_PATTERN :: ICUError
u_MULTIPLE_PERCENT_SYMBOLS :: ICUError
u_MULTIPLE_PERMILL_SYMBOLS :: ICUError
u_MULTIPLE_PAD_SPECIFIERS :: ICUError
u_PATTERN_SYNTAX_ERROR :: ICUError
u_ILLEGAL_PAD_POSITION :: ICUError
u_UNMATCHED_BRACES :: ICUError
u_ARGUMENT_TYPE_MISMATCH :: ICUError
u_DUPLICATE_KEYWORD :: ICUError
u_UNDEFINED_KEYWORD :: ICUError
u_DEFAULT_KEYWORD_MISSING :: ICUError
u_BRK_INTERNAL_ERROR :: ICUError
u_BRK_HEX_DIGITS_EXPECTED :: ICUError
u_BRK_SEMICOLON_EXPECTED :: ICUError
u_BRK_RULE_SYNTAX :: ICUError
u_BRK_UNCLOSED_SET :: ICUError
u_BRK_ASSIGN_ERROR :: ICUError
u_BRK_VARIABLE_REDFINITION :: ICUError
u_BRK_MISMATCHED_PAREN :: ICUError
u_BRK_NEW_LINE_IN_QUOTED_STRING :: ICUError
u_BRK_UNDEFINED_VARIABLE :: ICUError
u_BRK_INIT_ERROR :: ICUError
u_BRK_RULE_EMPTY_SET :: ICUError
u_BRK_UNRECOGNIZED_OPTION :: ICUError
u_BRK_MALFORMED_RULE_TAG :: ICUError
u_REGEX_INTERNAL_ERROR :: ICUError
u_REGEX_RULE_SYNTAX :: ICUError
u_REGEX_INVALID_STATE :: ICUError
u_REGEX_BAD_ESCAPE_SEQUENCE :: ICUError
u_REGEX_PROPERTY_SYNTAX :: ICUError
u_REGEX_UNIMPLEMENTED :: ICUError
u_REGEX_MISMATCHED_PAREN :: ICUError
u_REGEX_NUMBER_TOO_BIG :: ICUError
u_REGEX_BAD_INTERVAL :: ICUError
u_REGEX_MAX_LT_MIN :: ICUError
u_REGEX_INVALID_BACK_REF :: ICUError
u_REGEX_INVALID_FLAG :: ICUError
u_REGEX_SET_CONTAINS_STRING :: ICUError
u_REGEX_OCTAL_TOO_BIG :: ICUError
u_REGEX_INVALID_RANGE :: ICUError
u_REGEX_STACK_OVERFLOW :: ICUError
u_REGEX_TIME_OUT :: ICUError
u_REGEX_STOPPED_BY_CALLER :: ICUError
u_IDNA_PROHIBITED_ERROR :: ICUError
u_IDNA_UNASSIGNED_ERROR :: ICUError
u_IDNA_CHECK_BIDI_ERROR :: ICUError
u_IDNA_STD3_ASCII_RULES_ERROR :: ICUError
u_IDNA_ACE_PREFIX_ERROR :: ICUError
u_IDNA_VERIFICATION_ERROR :: ICUError
u_IDNA_LABEL_TOO_LONG_ERROR :: ICUError
u_IDNA_ZERO_LENGTH_LABEL_ERROR :: ICUError
u_IDNA_DOMAIN_NAME_TOO_LONG_ERROR :: ICUError

-- | Character set conversion functions for Unicode, implemented as
--   bindings to the International Components for Unicode (ICU) libraries.
module Data.Text.ICU.Convert

-- | Character set converter type. Note: this structure is not
--   thread safe. It is not safe to use value of this type
--   simultaneously from multiple threads.
data Converter

-- | Create a Converter with the name of a coded character set
--   specified as a string. The actual name will be resolved with the alias
--   file using a case-insensitive string comparison that ignores leading
--   zeroes and all non-alphanumeric characters. E.g., the names
--   "UTF8", "utf-8", "u*T@f08" and "Utf
--   8" are all equivalent (see also compareNames). If an empty
--   string is passed for the converter name, it will create one with the
--   getDefaultName return value.
--   
--   A converter name may contain options like a locale specification to
--   control the specific behavior of the newly instantiated converter. The
--   meaning of the options depends on the particular converter. If an
--   option is not defined for or recognized by a given converter, then it
--   is ignored.
--   
--   Options are appended to the converter name string, with a comma
--   between the name and the first option and also between adjacent
--   options.
--   
--   If the alias is ambiguous, then the preferred converter is used.
--   
--   The conversion behavior and names can vary between platforms. ICU may
--   convert some characters differently from other platforms. Details on
--   this topic are in the ICU User's Guide at
--   http://icu-project.org/userguide/conversion.html. Aliases
--   starting with a "cp" prefix have no specific meaning other
--   than its an alias starting with the letters "cp". Please do
--   not associate any meaning to these aliases.
open :: String -> Maybe Bool -> IO Converter

-- | Encode a Unicode string into a code page string using the given
--   converter.
fromUnicode :: Converter -> Text -> ByteString

-- | Decode an encoded string into a Unicode string using the given
--   converter.
toUnicode :: Converter -> ByteString -> Text

-- | Gets the internal, canonical name of the converter.
getName :: Converter -> String

-- | Determines whether the converter uses fallback mappings or not. This
--   flag has restrictions. Regardless of this flag, the converter will
--   always use fallbacks from Unicode Private Use codepoints, as well as
--   reverse fallbacks (to Unicode). For details see ".ucm File Format" in
--   the Conversion Data chapter of the ICU User Guide:
--   http://www.icu-project.org/userguide/conversion-data.html#ucmformat
usesFallback :: Converter -> Bool

-- | Indicates whether the converter contains ambiguous mappings of the
--   same character or not.
isAmbiguous :: Converter -> Bool

-- | Returns the current default converter name. If you want to open
--   a default converter, you do not need to use this function. It is
--   faster to pass the empty string to open the default converter.
getDefaultName :: IO String

-- | Sets the current default converter name. If this function needs to be
--   called, it should be called during application initialization. Most of
--   the time, the results from getDefaultName or open with
--   an empty string argument is sufficient for your application.
--   
--   Note: this function is not thread safe. Do not call this
--   function when any ICU function is being used from more than one
--   thread!
setDefaultName :: String -> IO ()

-- | Do a fuzzy compare of two converter/alias names. The comparison is
--   case-insensitive, ignores leading zeroes if they are not followed by
--   further digits, and ignores all but letters and digits. Thus the
--   strings "UTF-8", "utf_8", "u*T@f08" and
--   "Utf 8" are exactly equivalent. See section 1.4, Charset
--   Alias Matching in Unicode Technical Standard #22 at
--   http://www.unicode.org/reports/tr22/
compareNames :: String -> String -> Ordering

-- | Return the aliases for a given converter or alias name.
aliases :: String -> [String]

-- | A list of the canonical names of all available converters.
converterNames :: [String]

-- | The list of supported standard names.
standardNames :: [String]

-- | String collation functions for Unicode, implemented as bindings to the
--   International Components for Unicode (ICU) libraries.
module Data.Text.ICU.Collate

-- | String collator type.
data MCollator
data Attribute

-- | Direction of secondary weights, used in French. True, results
--   in secondary weights being considered backwards, while False
--   treats secondary weights in the order in which they appear.
French :: Bool -> Attribute

-- | For handling variable elements. NonIgnorable is default.
AlternateHandling :: AlternateHandling -> Attribute

-- | Control the ordering of upper and lower case letters. Nothing
--   (the default) orders upper and lower case letters in accordance to
--   their tertiary weights.
CaseFirst :: Maybe CaseFirst -> Attribute

-- | Controls whether an extra case level (positioned before the third
--   level) is generated or not. When False (default), case level is
--   not generated; when True, the case level is generated. Contents
--   of the case level are affected by the value of the CaseFirst
--   attribute. A simple way to ignore accent differences in a string is to
--   set the strength to Primary and enable case level.
CaseLevel :: Bool -> Attribute

-- | Controls whether the normalization check and necessary normalizations
--   are performed. When False (default) no normalization check is
--   performed. The correctness of the result is guaranteed only if the
--   input data is in so-called FCD form (see users manual for
--   more info). When True, an incremental check is performed to see
--   whether the input data is in FCD form. If the data is not in
--   FCD form, incremental NFD normalization is
--   performed.
NormalizationMode :: Bool -> Attribute
Strength :: Strength -> Attribute

-- | When turned on, this attribute positions Hiragana before all
--   non-ignorables on quaternary level. This is a sneaky way to produce
--   JIS sort order.
HiraganaQuaternaryMode :: Bool -> Attribute

-- | When enabled, this attribute generates a collation key for the numeric
--   value of substrings of digits. This is a way to get '100' to sort
--   after '2'.
Numeric :: Bool -> Attribute

-- | Control the handling of variable weight elements.
data AlternateHandling

-- | Treat all codepoints with non-ignorable primary weights in the same
--   way.
NonIgnorable :: AlternateHandling

-- | Cause codepoints with primary weights that are equal to or below the
--   variable top value to be ignored on primary level and moved to the
--   quaternary level.
Shifted :: AlternateHandling

-- | Control the ordering of upper and lower case letters.
data CaseFirst

-- | Force upper case letters to sort before lower case.
UpperFirst :: CaseFirst

-- | Force lower case letters to sort before upper case.
LowerFirst :: CaseFirst

-- | The strength attribute. The usual strength for most locales (except
--   Japanese) is tertiary. Quaternary strength is useful when combined
--   with shifted setting for alternate handling attribute and for JIS x
--   4061 collation, when it is used to distinguish between Katakana and
--   Hiragana (this is achieved by setting HiraganaQuaternaryMode
--   mode to True). Otherwise, quaternary level is affected only by
--   the number of non ignorable codepoints in the string. Identical
--   strength is rarely useful, as it amounts to codepoints of the
--   NFD form of the string.
data Strength
Primary :: Strength
Secondary :: Strength
Tertiary :: Strength
Quaternary :: Strength
Identical :: Strength

-- | Open a Collator for comparing strings.
open :: LocaleName -> IO MCollator

-- | Produce a Collator instance according to the rules supplied.
openRules :: Text -> Maybe Bool -> Maybe Strength -> IO MCollator

-- | Compare two strings.
collate :: MCollator -> Text -> Text -> IO Ordering

-- | Compare two CharIterators.
--   
--   If either iterator was constructed from a ByteString, it does
--   not need to be copied or converted internally, so this function can be
--   quite cheap.
collateIter :: MCollator -> CharIterator -> CharIterator -> IO Ordering

-- | Get the rules of an MCollator attribute.
getRules :: MCollator -> IO Text

-- | Get the value of an MCollator attribute.
--   
--   It is safe to provide a dummy argument to an Attribute
--   constructor when using this function, so the following will work:
--   
--   
--   getAttribute mcol (NormalizationMode undefined)
--   
getAttribute :: MCollator -> Attribute -> IO Attribute

-- | Set the value of an MCollator attribute.
setAttribute :: MCollator -> Attribute -> IO ()

-- | Create a key for sorting the Text using the given
--   Collator. The result of comparing two ByteStrings that
--   have been transformed with sortKey will be the same as the
--   result of collate on the two untransformed Texts.
sortKey :: MCollator -> Text -> IO ByteString

-- | Make a copy of a mutable MCollator. Subsequent changes to the
--   input MCollator will not affect the state of the returned
--   MCollator.
clone :: MCollator -> IO MCollator

-- | Make a safe copy of a mutable MCollator for use in pure code.
--   Subsequent changes to the MCollator will not affect the state
--   of the returned Collator.
freeze :: MCollator -> IO Collator
instance GHC.Internal.Enum.Bounded Data.Text.ICU.Collate.AlternateHandling
instance GHC.Internal.Enum.Bounded Data.Text.ICU.Collate.CaseFirst
instance GHC.Internal.Enum.Bounded Data.Text.ICU.Collate.Strength
instance GHC.Internal.Enum.Enum Data.Text.ICU.Collate.AlternateHandling
instance GHC.Internal.Enum.Enum Data.Text.ICU.Collate.CaseFirst
instance GHC.Internal.Enum.Enum Data.Text.ICU.Collate.Strength
instance GHC.Classes.Eq Data.Text.ICU.Collate.AlternateHandling
instance GHC.Classes.Eq Data.Text.ICU.Collate.Attribute
instance GHC.Classes.Eq Data.Text.ICU.Collate.CaseFirst
instance GHC.Classes.Eq Data.Text.ICU.Collate.Strength
instance Control.DeepSeq.NFData Data.Text.ICU.Collate.AlternateHandling
instance Control.DeepSeq.NFData Data.Text.ICU.Collate.Attribute
instance Control.DeepSeq.NFData Data.Text.ICU.Collate.CaseFirst
instance Control.DeepSeq.NFData Data.Text.ICU.Collate.Strength
instance GHC.Internal.Show.Show Data.Text.ICU.Collate.AlternateHandling
instance GHC.Internal.Show.Show Data.Text.ICU.Collate.Attribute
instance GHC.Internal.Show.Show Data.Text.ICU.Collate.CaseFirst
instance GHC.Internal.Show.Show Data.Text.ICU.Collate.Strength

-- | Access to the Unicode Character Set Detection facilities, implemented
--   in the International Components for Unicode (ICU) libraries.
--   
--   For more information see the "Character Set Detection" chapter in the
--   ICU User Guide
--   http://userguide.icu-project.org/conversion/detection.
module Data.Text.ICU.CharsetDetection

-- | From the ICU C API documentation: "Character set detection is at best
--   an imprecise operation. The detection process will attempt to identify
--   the charset that best matches the characteristics of the byte data,
--   but the process is partly statistical in nature, and the results can
--   not be guaranteed to always be correct.
--   
--   For best accuracy in charset detection, the input data should be
--   primarily in a single language, and a minimum of a few hundred bytes
--   worth of plain text in the language are needed. The detection process
--   will attempt to ignore html or xml style markup that could otherwise
--   obscure the content."
--   
--   Use the first 512 bytes, if available, as the text in the
--   CharsetDetector object. This function is low-level and used by
--   the more high-level detect function.
setText :: ByteString -> CharsetDetector -> IO ()

-- | Attempt to perform a detection without an input filter. The best match
--   will be returned.
detect :: ByteString -> IO CharsetMatch
mkCharsetDetector :: IO CharsetDetector

-- | Temporarily unwraps an CharsetDetector to perform operations on
--   its raw UCharsetDetector handle.
withCharsetDetector :: CharsetDetector -> (Ptr UCharsetDetector -> IO a) -> IO a
wrapUCharsetMatch :: CharsetDetector -> IO (Ptr UCharsetMatch) -> IO CharsetMatch

-- | Opaque character set match handle. The memory backing these objects is
--   managed entirely by the ICU C library. TODO: UCharsetMatch is reset
--   after the setText call. We need to handle it.
data CharsetMatch

-- | Handy wrapper for the pointer to the UCharsetDetector. We must
--   always call ucsdet_close on any UCharsetDetector when we are done. The
--   withCharsetDetector and wrapUCharsetDetector functions
--   simplify management of the pointers.
data CharsetDetector

-- | See the confidence score from 0-100 of the CharsetMatch object.
getConfidence :: CharsetMatch -> IO Int

-- | Extract the character set encoding name from the CharsetMatch
--   object.
getName :: CharsetMatch -> IO Text

-- | Extracts the three letter ISO code for the language encoded in the
--   CharsetMatch.
getLanguage :: CharsetMatch -> IO Text

-- | Calendar functions implemented as bindings to the International
--   Components for Unicode (ICU) libraries.
module Data.Text.ICU.Calendar
data Calendar
Calendar :: ForeignPtr UCalendar -> Calendar
[calendarForeignPtr] :: Calendar -> ForeignPtr UCalendar
data CalendarType
TraditionalCalendarType :: CalendarType
DefaultCalendarType :: CalendarType
GregorianCalendarType :: CalendarType
data SystemTimeZoneType
AnyTimeZone :: SystemTimeZoneType
CanonicalTimeZone :: SystemTimeZoneType
CanonicalLocationTimeZone :: SystemTimeZoneType

-- | All the fields that comprise a Calendar.
data CalendarField

-- | Field indicating the era, e.g., AD or BC in the Gregorian (Julian)
--   calendar. This is a calendar-specific value.
Era :: CalendarField

-- | Field indicating the year. This is a calendar-specific value.
Year :: CalendarField

-- | Field indicating the month. This is a calendar-specific value. The
--   first month of the year is JANUARY; the last depends on the number of
--   months in a year. Note: Calendar month is 0-based.
Month :: CalendarField

-- | Field indicating the week number within the current year. The first
--   week of the year, as defined by UCAL_FIRST_DAY_OF_WEEK and
--   UCAL_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. Subclasses
--   define the value of UCAL_WEEK_OF_YEAR for days before the first week
--   of the year.
WeekOfYear :: CalendarField

-- | Field indicating the week number within the current month. The first
--   week of the month, as defined by UCAL_FIRST_DAY_OF_WEEK and
--   UCAL_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. Subclasses
--   define the value of WEEK_OF_MONTH for days before the first week of
--   the month.
WeekOfMonth :: CalendarField

-- | Field indicating the day of the month. This is a synonym for
--   DAY_OF_MONTH. The first day of the month has value 1.
DayOfMonth :: CalendarField

-- | Field indicating the day number within the current year. The first day
--   of the year has value 1.
DayOfYear :: CalendarField

-- | Field indicating the day of the week. This field takes values SUNDAY,
--   MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY. Note:
--   Calendar day-of-week is 1-based. Clients who create locale resources
--   for the field of first-day-of-week should be aware of this. For
--   instance, in US locale, first-day-of-week is set to 1, i.e.,
--   UCAL_SUNDAY.
DayOfWeek :: CalendarField

-- | Field indicating the ordinal number of the day of the week within the
--   current month. Together with the DAY_OF_WEEK field, this uniquely
--   specifies a day within a month. Unlike WEEK_OF_MONTH and WEEK_OF_YEAR,
--   this field's value does not depend on getFirstDayOfWeek() or
--   getMinimalDaysInFirstWeek(). DAY_OF_MONTH 1 through 7 always
--   correspond to DAY_OF_WEEK_IN_MONTH 1; 8 through 15 correspond to
--   DAY_OF_WEEK_IN_MONTH 2, and so on. DAY_OF_WEEK_IN_MONTH 0 indicates
--   the week before DAY_OF_WEEK_IN_MONTH 1. Negative values count back
--   from the end of the month, so the last Sunday of a month is specified
--   as DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1. Because negative
--   values count backward they will usually be aligned differently within
--   the month than positive values. For example, if a month has 31 days,
--   DAY_OF_WEEK_IN_MONTH -1 will overlap DAY_OF_WEEK_IN_MONTH 5 and the
--   end of 4.
DayOfWeekInMonth :: CalendarField

-- | Field indicating whether the HOUR is before or after noon. E.g., at
--   10:04:15.250 PM the AM_PM is PM.
AmPm :: CalendarField

-- | Field indicating the hour of the morning or afternoon. HOUR is used
--   for the 12-hour clock. E.g., at 10:04:15.250 PM the HOUR is 10.
Hour :: CalendarField

-- | Field indicating the hour of the day. HOUR_OF_DAY is used for the
--   24-hour clock. E.g., at 10:04:15.250 PM the HOUR_OF_DAY is 22.
HourOfDay :: CalendarField

-- | Field indicating the minute within the hour. E.g., at 10:04:15.250 PM
--   the UCAL_MINUTE is 4.
Minute :: CalendarField

-- | Field indicating the second within the minute. E.g., at 10:04:15.250
--   PM the UCAL_SECOND is 15.
Second :: CalendarField

-- | Field indicating the millisecond within the second. E.g., at
--   10:04:15.250 PM the UCAL_MILLISECOND is 250.
Millisecond :: CalendarField

-- | Field indicating the raw offset from GMT in milliseconds.
ZoneOffset :: CalendarField

-- | Field indicating the daylight savings offset in milliseconds.
DstOffset :: CalendarField

-- | Field indicating the extended year corresponding to the
--   UCAL_WEEK_OF_YEAR field. This may be one greater or less than the
--   value of UCAL_EXTENDED_YEAR.
YearWoY :: CalendarField

-- | Field indicating the localized day of week. This will be a value from
--   1 to 7 inclusive, with 1 being the localized first day of the week.
DoWLocal :: CalendarField

-- | Year of this calendar system, encompassing all supra-year fields. For
--   example, in Gregorian/Julian calendars, positive Extended Year values
--   indicate years AD, 1 BC = 0 extended, 2 BC = -1 extended, and so on.
ExtendedYear :: CalendarField

-- | Field indicating the modified Julian day number. This is different
--   from the conventional Julian day number in two regards. First, it
--   demarcates days at local zone midnight, rather than noon GMT. Second,
--   it is a local number; that is, it depends on the local time zone. It
--   can be thought of as a single number that encompasses all the
--   date-related fields.
JulianDay :: CalendarField

-- | Ranges from 0 to 23:59:59.999 (regardless of DST). This field behaves
--   exactly like a composite of all time-related fields, not including the
--   zone fields. As such, it also reflects discontinuities of those fields
--   on DST transition days. On a day of DST onset, it will jump forward.
--   On a day of DST cessation, it will jump backward. This reflects the
--   fact that it must be combined with the DST_OFFSET field to obtain a
--   unique local time value.
MillisecondsInDay :: CalendarField

-- | Whether or not the current month is a leap month (0 or 1). See the
--   Chinese calendar for an example of this.
IsLeapMonth :: CalendarField
type UCalendar = CInt

-- | Add a specified signed amount to a particular field in a Calendar.
--   
--   See rollField for further details.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c1 <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> show c1
--   2021-10-12 17:53:26
--   
--   >>> let c2 = roll c1 [(Hour, 2)]
--   
--   >>> show c2
--   2021-10-12 19:53:26
--   
--   >>> let c3 = roll c1 [(Hour, 12)]
--   
--   >>> show c3
--   2021-10-12 17:53:26
--   
--   >>> let c4 = add c1 [(Hour, 12)]
--   
--   >>> show c4
--   2021-10-13 5:53:26
--   
roll :: Calendar -> [(CalendarField, Int)] -> Calendar

-- | Add a specified signed amount to a particular field in a Calendar.
--   
--   See addField for further details and see rollField for
--   examples and differences compared to rolling.
add :: Calendar -> [(CalendarField, Int)] -> Calendar

-- | Set the value of one field of a calendar to a certain value. All
--   fields are represented as 32-bit integers.
set1 :: Calendar -> CalendarField -> Int -> Calendar

-- | Set the value of a list of fields of a calendar to certain values. All
--   fields are represented as 32-bit integers.
set :: Calendar -> [(CalendarField, Int)] -> Calendar

-- | Get the value of a specific field in the calendar.
get :: Calendar -> CalendarField -> Int

-- | Return the era of the calendar. The values are calendar specific and
--   are usually 0 (some ancient era) and 1 (current era).
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c1 <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> era c1
--   1
--   
era :: Calendar -> Int

-- | Return the year of the calendar. The values are calendar specific.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c1 <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> year c1
--   2021
--   
year :: Calendar -> Int

-- | Return the month of the calendar. The values are calendar specific and
--   0-based.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c1 <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> month c1
--   9
--   
--   >>> day c1
--   2021-10-12
--   
month :: Calendar -> Int
dayOfMonth :: Calendar -> Int
dayOfYear :: Calendar -> Int
dayOfWeek :: Calendar -> Int
dayOfWeekInMonth :: Calendar -> Int
amPm :: Calendar -> Int
hour :: Calendar -> Int
hourOfDay :: Calendar -> Int
minute :: Calendar -> Int
second :: Calendar -> Int
millisecond :: Calendar -> Int
zoneOffset :: Calendar -> Int
dstOffset :: Calendar -> Int
yearWoY :: Calendar -> Int
doWLocal :: Calendar -> Int
extendedYear :: Calendar -> Int
julianDay :: Calendar -> Int
millisecondsInDay :: Calendar -> Int
isLeapMonth :: Calendar -> Bool

-- | Convert the day part of the calendar to a Day.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c1 <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> show c1
--   2021-10-12 18:00:50
--   
--   >>> day c1
--   2021-10-12
--   
day :: Calendar -> Day

-- | Convert the day and time part of the calendar to a UTCTime.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c1 <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> show c1
--   2021-10-12 18:00:50
--   
--   >>> utcTime c1
--   2021-10-12 16:00:50.544999999998 UTC
--   
utcTime :: Calendar -> UTCTime
setEra :: Calendar -> Int -> Calendar
setYear :: Calendar -> Int -> Calendar
setMonth :: Calendar -> Int -> Calendar
setDayOfMonth :: Calendar -> Int -> Calendar
setDayOfYear :: Calendar -> Int -> Calendar
setDayOfWeek :: Calendar -> Int -> Calendar
setDayOfWeekInMonth :: Calendar -> Int -> Calendar
setAmPm :: Calendar -> Int -> Calendar
setHour :: Calendar -> Int -> Calendar
setHourOfDay :: Calendar -> Int -> Calendar
setMinute :: Calendar -> Int -> Calendar
setSecond :: Calendar -> Int -> Calendar
setMillisecond :: Calendar -> Int -> Calendar
setZoneOffset :: Calendar -> Int -> Calendar
setDstOffset :: Calendar -> Int -> Calendar
setYearWoY :: Calendar -> Int -> Calendar
setDoWLocal :: Calendar -> Int -> Calendar
setExtendedYear :: Calendar -> Int -> Calendar
setJulianDay :: Calendar -> Int -> Calendar
setMillisecondsInDay :: Calendar -> Int -> Calendar

-- | Set the day part of the calendar from a Day.
setDay :: Calendar -> Day -> Calendar
_era :: Lens' Calendar Int
_year :: Lens' Calendar Int
_month :: Lens' Calendar Int
_dayOfMonth :: Lens' Calendar Int
_dayOfYear :: Lens' Calendar Int
_dayOfWeek :: Lens' Calendar Int
_dayOfWeekInMonth :: Lens' Calendar Int
_amPm :: Lens' Calendar Int
_hour :: Lens' Calendar Int
_hourOfDay :: Lens' Calendar Int
_minute :: Lens' Calendar Int
_second :: Lens' Calendar Int
_millisecond :: Lens' Calendar Int
_zoneOffset :: Lens' Calendar Int
_dstOffset :: Lens' Calendar Int
_day :: Lens' Calendar Day
timeZoneIDs :: SystemTimeZoneType -> IO [Text]

-- | List of all time zones.
timeZones :: IO [Text]

-- | Open a Calendar.
--   
--   A Calendar may be used to convert a millisecond value to a year,
--   month, and day.
--   
--   Note: When unknown TimeZone ID is specified or if the TimeZone ID
--   specified is "Etc/Unknown", the Calendar returned by the function is
--   initialized with GMT zone with TimeZone ID UCAL_UNKNOWN_ZONE_ID
--   ("EtcUnknown") without any errorswarnings. If you want to check
--   if a TimeZone ID is valid prior to this function, use
--   ucal_getCanonicalTimeZoneID.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> show c
--   2021-10-12 17:37:43
--   
calendar :: Text -> LocaleName -> CalendarType -> IO Calendar
openTimeZoneIDEnumeration :: SystemTimeZoneType -> IO Enumerator

-- | Create an enumeration over all time zones.
openTimeZones :: IO Enumerator

-- | Get the value of a specific calendar field.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> getField c Year
--   2021
--   
getField :: Calendar -> CalendarField -> IO Int
setField :: Calendar -> CalendarField -> Int -> IO ()
setDate :: Calendar -> Int -> Int -> Int -> IO ()
setDateTime :: Calendar -> Int -> Int -> Int -> Int -> Int -> Int -> IO ()

-- | Add a specified signed amount to a particular field in a Calendar.
--   
--   This will not modify more significant fields in the calendar. Rolling
--   by a positive value always means moving forward in time (unless the
--   limit of the field is reached, in which case it may pin or wrap), so
--   for Gregorian calendar, starting with 100 BC and rolling the year by
--   +1 results in 99 BC. When eras have a definite beginning and end (as
--   in the Chinese calendar, or as in most eras in the Japanese calendar)
--   then rolling the year past either limit of the era will cause the year
--   to wrap around. When eras only have a limit at one end, then
--   attempting to roll the year past that limit will result in pinning the
--   year at that limit. Note that for most calendars in which era 0 years
--   move forward in time (such as Buddhist, Hebrew, or Islamic), it is
--   possible for add or roll to result in negative years for era 0 (that
--   is the only way to represent years before the calendar epoch).
rollField :: Calendar -> CalendarField -> Int -> IO ()

-- | Add a specified signed amount to a particular field in a Calendar.
--   
--   This can modify more significant fields in the calendar. Adding a
--   positive value always means moving forward in time, so for the
--   Gregorian calendar, starting with 100 BC and adding +1 to year results
--   in 99 BC (even though this actually reduces the numeric value of the
--   field itself).
addField :: Calendar -> CalendarField -> Int -> IO ()
setTimeZone :: Calendar -> Text -> IO ()
instance GHC.Classes.Eq Data.Text.ICU.Calendar.CalendarField
instance GHC.Classes.Eq Data.Text.ICU.Calendar.CalendarType
instance GHC.Classes.Eq Data.Text.ICU.Calendar.SystemTimeZoneType
instance GHC.Internal.Read.Read Data.Text.ICU.Calendar.CalendarField
instance GHC.Internal.Read.Read Data.Text.ICU.Calendar.CalendarType
instance GHC.Internal.Read.Read Data.Text.ICU.Calendar.SystemTimeZoneType
instance GHC.Internal.Show.Show Data.Text.ICU.Calendar.Calendar
instance GHC.Internal.Show.Show Data.Text.ICU.Calendar.CalendarField
instance GHC.Internal.Show.Show Data.Text.ICU.Calendar.CalendarType
instance GHC.Internal.Show.Show Data.Text.ICU.Calendar.SystemTimeZoneType

-- | Calendar formatter implemented as bindings to the International
--   Components for Unicode (ICU) libraries. You display or print a Date by
--   first converting it to a locale-specific string that conforms to the
--   conventions of the end user’s Locale. For example, Germans recognize
--   20.4.98 as a valid date, and Americans recognize 42098.
--   
--   👉 Note: The appropriate Calendar support is required for different
--   locales. For example, the Buddhist calendar is the official calendar
--   in Thailand so the typical assumption of Gregorian Calendar usage
--   should not be used. ICU will pick the appropriate Calendar based on
--   the locale you supply when opening a Calendar or DateFormat.
--   
--   Date and time formatters are used to convert dates and times from
--   their internal representations to textual form in a
--   language-independent manner.
module Data.Text.ICU.DateFormatter

-- | This is an abstract data type holding a reference to the ICU date
--   format object. Create a DateFormatter with either
--   standardDateFormatter or patternDateFormatter and use it
--   in order to format Calendar objects with the function
--   formatCalendar.
data DateFormatter

-- | The possible date/time format styles.
data FormatStyle

-- | Full style, such as Tuesday, April 12, 1952 AD or 3:30:42pm PST
FullFormatStyle :: FormatStyle

-- | Long style, such as January 12, 1952 or 3:30:32pm
LongFormatStyle :: FormatStyle

-- | Medium style, such as Jan. 12, 1952
MediumFormatStyle :: FormatStyle

-- | Short style, such as 121352 or 3:30pm
ShortFormatStyle :: FormatStyle

-- | Default style
DefaultFormatStyle :: FormatStyle

-- | Relative style: ICU currently provides limited support for formatting
--   dates using a “relative” style, specified using RELATIVE_SHORT,
--   RELATIVE_MEDIUM, RELATIVE_LONG or RELATIVE_FULL. As currently
--   implemented, relative date formatting only affects the formatting of
--   dates within a limited range of calendar days before or after the
--   current date, based on the CLDR type="day"/relative
--   data: For example, in English, “Yesterday”, “Today”, and “Tomorrow”.
--   Within this range, the specific relative style currently makes no
--   difference. Outside of this range, relative dates are formatted using
--   the corresponding non-relative style (SHORT, MEDIUM, etc.). Relative
--   time styles are not currently supported, and behave just like the
--   corresponding non-relative style.
RelativeFormatStyle :: FormatStyle

-- | No style.
NoFormatStyle :: FormatStyle

-- | The possible types of date format symbols.
data DateFormatSymbolType

-- | The era names, for example AD.
Eras :: DateFormatSymbolType

-- | The month names, for example February.
Months :: DateFormatSymbolType

-- | The short month names, for example Feb.
ShortMonths :: DateFormatSymbolType

-- | The CLDR-style format "wide" weekday names, for example Monday.
Weekdays :: DateFormatSymbolType

-- | The CLDR-style format "abbreviated" (not "short") weekday names, for
--   example "Mon." For the CLDR-style format "short" weekday names, use
--   UDAT_SHORTER_WEEKDAYS.
ShortWeekdays :: DateFormatSymbolType

-- | The AM/PM names, for example AM.
AmPms :: DateFormatSymbolType

-- | The localized characters.
LocalizedChars :: DateFormatSymbolType

-- | The long era names, for example Anno Domini.
EraNames :: DateFormatSymbolType

-- | The narrow month names, for example F.
NarrowMonths :: DateFormatSymbolType

-- | The CLDR-style format "narrow" weekday names, for example M.
NarrowWeekdays :: DateFormatSymbolType

-- | Standalone context versions of months.
StandaloneMonths :: DateFormatSymbolType

-- | The CLDR-style stand-alone "wide" weekday names.
StandaloneWeekdays :: DateFormatSymbolType

-- | The CLDR-style stand-alone "abbreviated" (not "short") weekday names.
--   For the CLDR-style stand-alone "short" weekday names, use
--   UDAT_STANDALONE_SHORTER_WEEKDAYS.
StandaoneShortWeekdays :: DateFormatSymbolType

-- | The CLDR-style stand-alone "narrow" weekday names.
StandaloneNarrowWeekdays :: DateFormatSymbolType

-- | The quarters, for example 1st Quarter.
Quarters :: DateFormatSymbolType

-- | The short quarter names, for example Q1.
ShortQuarters :: DateFormatSymbolType

-- | Standalone context versions of quarters.
StandaloneQuarters :: DateFormatSymbolType

-- | The CLDR-style short weekday names, e.g. Su, Mo", etc. These
--   are named SHORTER to contrast with the constants using SHORT
--   above, which actually get the CLDR-style abbreviated versions of the
--   corresponding names.
ShorterWeekdays :: DateFormatSymbolType

-- | Standalone version of UDAT_SHORTER_WEEKDAYS.
StandaloneShorterWeekdays :: DateFormatSymbolType

-- | Cyclic year names (only supported for some calendars, and only for
--   FORMAT usage; udat_setSymbols not supported for
--   UDAT_CYCLIC_YEARS_WIDE)
CyclicYearsWide :: DateFormatSymbolType

-- | Cyclic year names (only supported for some calendars, and only for
--   FORMAT usage)
CyclicYearsAbbreviated :: DateFormatSymbolType

-- | Cyclic year names (only supported for some calendars, and only for
--   FORMAT usage; udat_setSymbols not supported for
--   UDAT_CYCLIC_YEARS_NARROW)
CyclicYearsNarrow :: DateFormatSymbolType

-- | Calendar zodiac names (only supported for some calendars, and only for
--   FORMAT usage; udat_setSymbols not supported for
--   UDAT_ZODIAC_NAMES_WIDE)
ZodiacNamesWide :: DateFormatSymbolType

-- | Calendar zodiac names (only supported for some calendars, and only for
--   FORMAT usage)
ZodiacNamesAbbreviated :: DateFormatSymbolType

-- | Calendar zodiac names (only supported for some calendars, and only for
--   FORMAT usage; udat_setSymbols not supported for
--   UDAT_ZODIAC_NAMES_NARROW)
ZodiacNamesNarrow :: DateFormatSymbolType

-- | The narrow quarter names, for example 1.
NarrowQuarters :: DateFormatSymbolType

-- | The narrow standalone quarter names, for example 1.
StandaloneNarrowQuarters :: DateFormatSymbolType

-- | Create a new DateFormatter from the standard styles.
--   
--   
--   >>> import Data.Text
--   
--   >>> dfDe <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_DE") (pack "CET")
--   
standardDateFormatter :: FormatStyle -> FormatStyle -> LocaleName -> Text -> IO DateFormatter

-- | Create a new DateFormatter using a custom pattern as described
--   at
--   https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax.
--   For examples the pattern "yyyy.MM.dd G at HH:mm:ss zzz"
--   produces “1996.07.10 AD at 15:08:56 PDT” in English for the PDT time
--   zone.
--   
--   A date pattern is a string of characters, where specific strings of
--   characters are replaced with date and time data from a calendar when
--   formatting or used to generate data for a calendar when parsing.
--   
--   The Date Field Symbol Table contains the characters used in
--   patterns to show the appropriate formats for a given locale, such as
--   yyyy for the year. Characters may be used multiple times. For example,
--   if y is used for the year, "yy" might produce “99”, whereas "yyyy"
--   produces “1999”. For most numerical fields, the number of characters
--   specifies the field width. For example, if h is the hour, "h" might
--   produce “5”, but "hh" produces “05”. For some characters, the count
--   specifies whether an abbreviated or full form should be used, but may
--   have other choices, as given below.
--   
--   Two single quotes represents a literal single quote, either inside or
--   outside single quotes. Text within single quotes is not interpreted in
--   any way (except for two adjacent single quotes). Otherwise all ASCII
--   letter from a to z and A to Z are reserved as syntax characters, and
--   require quoting if they are to represent literal characters. In
--   addition, certain ASCII punctuation characters may become variable in
--   the future (eg : being interpreted as the time separator and
--   / as a date separator, and replaced by respective
--   locale-sensitive characters in display).
--   
--   “Stand-alone” values refer to those designed to stand on their own
--   independently, as opposed to being with other formatted values. “2nd
--   quarter” would use the wide stand-alone format "qqqq", whereas “2nd
--   quarter 2007” would use the regular format "QQQQ yyyy". For more
--   information about format and stand-alone forms, see CLDR Calendar
--   Elements.
--   
--   The pattern characters used in the Date Field Symbol Table are defined
--   by CLDR; for more information see CLDR Date Field Symbol Table.
--   
--   👉 Note that the examples may not reflect current CLDR data.
patternDateFormatter :: Text -> LocaleName -> Text -> IO DateFormatter

-- | Get relevant date related symbols, e.g. month and weekday names.
--   
--   
--   >>> import Data.Text
--   
--   >>> dfDe <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_DE") (pack "CET")
--   
--   >>> dateSymbols dfDe Months
--   ["Januar","Februar","M\228rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]
--   
--   >>> dfAt <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_AT") (pack "CET")
--   
--   >>> dateSymbols dfAt Months
--   ["J\228nner","Februar","M\228rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]
--   
dateSymbols :: DateFormatter -> DateFormatSymbolType -> [Text]

-- | Format a Calendar using a DateFormatter.
--   
--   
--   >>> import Data.Text
--   
--   >>> dfDe <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_DE") (pack "CET")
--   
--   >>> c <- calendar (pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> formatCalendar dfDe c
--   "13. Oktober 2021 um 12:44:09 GMT+2"
--   
formatCalendar :: DateFormatter -> Calendar -> Text
instance GHC.Internal.Enum.Enum Data.Text.ICU.DateFormatter.FormatStyle
instance GHC.Classes.Eq Data.Text.ICU.DateFormatter.FormatStyle
instance GHC.Internal.Show.Show Data.Text.ICU.DateFormatter.FormatStyle

-- | String breaking functions for Unicode, implemented as bindings to the
--   International Components for Unicode (ICU) libraries.
--   
--   The text boundary positions are found according to the rules described
--   in Unicode Standard Annex #29, Text Boundaries, and Unicode Standard
--   Annex #14, Line Breaking Properties. These are available at
--   http://www.unicode.org/reports/tr14/ and
--   http://www.unicode.org/reports/tr29/.
module Data.Text.ICU.Break
data BreakIterator a

-- | Line break status.
data Line

-- | A soft line break is a position at which a line break is acceptable,
--   but not required.
Soft :: Line
Hard :: Line

-- | Word break status.
data Word

-- | A "word" that does not fit into another category. Includes spaces and
--   most punctuation.
Uncategorized :: Word

-- | A word that appears to be a number.
Number :: Word

-- | A word containing letters, excluding hiragana, katakana or ideographic
--   characters.
Letter :: Word

-- | A word containing kana characters.
Kana :: Word

-- | A word containing ideographic characters.
Ideograph :: Word

-- | Break a string on character boundaries.
--   
--   Character boundary analysis identifies the boundaries of "Extended
--   Grapheme Clusters", which are groupings of codepoints that should be
--   treated as character-like units for many text operations. Please see
--   Unicode Standard Annex #29, Unicode Text Segmentation,
--   http://www.unicode.org/reports/tr29/ for additional information
--   on grapheme clusters and guidelines on their use.
breakCharacter :: LocaleName -> Text -> IO (BreakIterator ())

-- | Break a string on line boundaries.
--   
--   Line boundary analysis determines where a text string can be broken
--   when line wrapping. The mechanism correctly handles punctuation and
--   hyphenated words.
breakLine :: LocaleName -> Text -> IO (BreakIterator Line)

-- | Break a string on sentence boundaries.
--   
--   Sentence boundary analysis allows selection with correct
--   interpretation of periods within numbers and abbreviations, and
--   trailing punctuation marks such as quotation marks and parentheses.
breakSentence :: LocaleName -> Text -> IO (BreakIterator ())

-- | Break a string on word boundaries.
--   
--   Word boundary analysis is used by search and replace functions, as
--   well as within text editing applications that allow the user to select
--   words with a double click. Word selection provides correct
--   interpretation of punctuation marks within and following words.
--   Characters that are not part of a word, such as symbols or punctuation
--   marks, have word breaks on both sides.
breakWord :: LocaleName -> Text -> IO (BreakIterator Word)

-- | Thread safe cloning operation. This is substantially faster than
--   creating a new BreakIterator from scratch.
clone :: BreakIterator a -> IO (BreakIterator a)

-- | Point an existing BreakIterator at a new piece of text.
setText :: BreakIterator a -> Text -> IO ()

-- | Return the character index most recently returned by next,
--   previous, first, or last.
current :: BreakIterator a -> IO (Maybe TextI)

-- | Reset the breaker to the beginning of the text to be scanned.
first :: BreakIterator a -> IO TextI

-- | Reset the breaker to the end of the text to be scanned.
last :: BreakIterator a -> IO TextI

-- | Advance the iterator and break at the text boundary that follows the
--   current text boundary.
next :: BreakIterator a -> IO (Maybe TextI)

-- | Advance the iterator and break at the text boundary that precedes the
--   current text boundary.
previous :: BreakIterator a -> IO (Maybe TextI)

-- | Determine the text boundary preceding the specified offset.
preceding :: BreakIterator a -> Int -> IO (Maybe TextI)

-- | Determine the text boundary following the specified offset.
following :: BreakIterator a -> Int -> IO (Maybe TextI)

-- | Determine whether the specified position is a boundary position. As a
--   side effect, leaves the iterator pointing to the first boundary
--   position at or after the given offset.
isBoundary :: BreakIterator a -> Int -> IO Bool

-- | Return the status from the break rule that determined the most
--   recently returned break position. For rules that do not specify a
--   status, a default value of () is returned.
getStatus :: BreakIterator a -> IO a

-- | Return statuses from all of the break rules that determined the most
--   recently returned break position.
getStatuses :: BreakIterator a -> IO [a]

-- | Locales for which text breaking information is available. A
--   BreakIterator in a locale in this list will perform the correct
--   text breaking for the locale.
available :: [LocaleName]
instance GHC.Internal.Enum.Enum Data.Text.ICU.Break.Line
instance GHC.Internal.Enum.Enum Data.Text.ICU.Break.Word
instance GHC.Classes.Eq Data.Text.ICU.Break.Line
instance GHC.Classes.Eq Data.Text.ICU.Break.Word
instance Control.DeepSeq.NFData Data.Text.ICU.Break.Line
instance Control.DeepSeq.NFData Data.Text.ICU.Break.Word
instance GHC.Internal.Show.Show Data.Text.ICU.Break.Line
instance GHC.Internal.Show.Show Data.Text.ICU.Break.Word

-- | Implementation of the Unicode Bidirectional Algorithm. See the
--   documentation of the libicu library for additional details.
--   
--   
--   
- - Note: this module is not thread safe. Do not call
--   the functions on one BiDi object from more than one thread!
--   
module Data.Text.ICU.BiDi

-- | BiDi object. Note: this structure is not thread safe. It is
--   not safe to use value of this type simultaneously from multiple
--   threads.
data BiDi

-- | Allocate a BiDi structure.
open :: IO BiDi

-- | Allocate a BiDi structure with preallocated memory for internal
--   structures.
openSized :: Int32 -> Int32 -> IO BiDi

-- | Perform the Unicode Bidi algorithm. It is defined in the Unicode
--   Standard Annex #9, version 13, also described in The Unicode Standard,
--   Version 4.0. This function takes a piece of plain text containing one
--   or more paragraphs, with or without externally specified embedding
--   levels from styled text and computes the left-right-directionality of
--   each character.
setPara :: BiDi -> Text -> Int32 -> IO ()

-- | Sets a BiDi to contain the reordering information, especially the
--   resolved levels, for all the characters in a line of text
setLine :: BiDi -> Int32 -> Int32 -> BiDi -> IO ()

-- | Get the number of paragraphs.
countParagraphs :: BiDi -> IO Int32

-- | Get a paragraph, given the index of this paragraph.
getParagraphByIndex :: BiDi -> Int32 -> IO (Int32, Int32)

-- | Get the length of the source text processed by the last call to
--   setPara.
getProcessedLength :: BiDi -> IO Int32

-- | Take a BiDi object containing the reordering information for a piece
--   of text (one or more paragraphs) set by setPara or for a line
--   of text set by setLine and write a reordered string to the
--   destination buffer.
writeReordered :: BiDi -> [WriteOption] -> IO Text
data WriteOption

-- | replace characters with the "mirrored" property in RTL runs by their
--   mirror-image mappings
DoMirroring :: WriteOption

-- | surround the run with LRMs if necessary; this is part of the
--   approximate "inverse Bidi" algorithm
InsertLrmForNumeric :: WriteOption

-- | keep combining characters after their base characters in RTL runs
KeepBaseCombining :: WriteOption

-- | write the output in reverse order
OutputReverse :: WriteOption

-- | remove Bidi control characters (this does not affect
--   InsertLrmForNumeric)
RemoveBidiControls :: WriteOption

-- | Helper function to reorder a text to a series of paragraphs.
reorderParagraphs :: [WriteOption] -> Text -> [Text]
instance GHC.Internal.Show.Show Data.Text.ICU.BiDi.WriteOption

-- | Locale functions implemented as bindings to the International
--   Components for Unicode (ICU) libraries.
module Data.Text.ICU.Locale

-- | Get the available default locales, i.e. locales that return data when
--   passed to ICU APIs, but not including legacy or alias locales.
availableLocales :: IO [String]

-- | Character set normalization functions for Unicode, implemented as
--   bindings to the International Components for Unicode (ICU) libraries.
--   
--   This module is based on the now deprecated "unorm.h" functions. Please
--   use Data.Text.ICU.Normalize2 instead.

-- | Deprecated: Use Data.Text.ICU.Normalize2 instead
module Data.Text.ICU.Normalize

-- | Normalization modes.
data NormalizationMode

-- | No decomposition/composition.
None :: NormalizationMode

-- | Canonical decomposition.
NFD :: NormalizationMode

-- | Compatibility decomposition.
NFKD :: NormalizationMode

-- | Canonical decomposition followed by canonical composition.
NFC :: NormalizationMode

-- | Compatibility decomposition followed by canonical composition.
NFKC :: NormalizationMode

-- | "Fast C or D" form.
FCD :: NormalizationMode

-- | Normalize a string according to the specified normalization mode.
normalize :: NormalizationMode -> Text -> Text

-- | Perform an efficient check on a string, to quickly determine if the
--   string is in a particular normalization form.
--   
--   A Nothing result indicates that a definite answer could not be
--   determined quickly, and a more thorough check is required, e.g. with
--   isNormalized. The user may have to convert the string to its
--   normalized form and compare the results.
--   
--   A result of Just True or Just False
--   indicates that the string definitely is, or is not, in the given
--   normalization form.
quickCheck :: NormalizationMode -> Text -> Maybe Bool

-- | Indicate whether a string is in a given normalization form.
--   
--   Unlike quickCheck, this function returns a definitive result.
--   For NFD, NFKD, and FCD normalization forms, both
--   functions work in exactly the same ways. For NFC and
--   NFKC forms, where quickCheck may return Nothing,
--   this function will perform further tests to arrive at a definitive
--   result.
isNormalized :: NormalizationMode -> Text -> Bool

-- | Options to compare.
data CompareOption

-- | The caller knows that both strings fulfill the FCD conditions.
--   If not set, compare will quickCheck for
--   FCD and normalize if necessary.
InputIsFCD :: CompareOption

-- | Compare strings case-insensitively using case folding, instead of
--   case-sensitively. If set, then the following case folding options are
--   used.
CompareIgnoreCase :: CompareOption

-- | When case folding, exclude the special I character. For use with
--   Turkic (Turkish/Azerbaijani) text data.
FoldCaseExcludeSpecialI :: CompareOption

-- | Compare two strings for canonical equivalence. Further options include
--   case-insensitive comparison and codepoint order (as opposed to code
--   unit order).
--   
--   Canonical equivalence between two strings is defined as their
--   normalized forms (NFD or NFC) being identical. This
--   function compares strings incrementally instead of normalizing (and
--   optionally case-folding) both strings entirely, improving performance
--   significantly.
--   
--   Bulk normalization is only necessary if the strings do not fulfill the
--   FCD conditions. Only in this case, and only if the strings are
--   relatively long, is memory allocated temporarily. For FCD
--   strings and short non-FCD strings there is no memory
--   allocation.
compare :: [CompareOption] -> Text -> Text -> Ordering
instance GHC.Internal.Enum.Enum Data.Text.ICU.Normalize.CompareOption
instance GHC.Internal.Enum.Enum Data.Text.ICU.Normalize.NormalizationMode
instance GHC.Classes.Eq Data.Text.ICU.Normalize.CompareOption
instance GHC.Classes.Eq Data.Text.ICU.Normalize.NormalizationMode
instance GHC.Internal.Show.Show Data.Text.ICU.Normalize.CompareOption
instance GHC.Internal.Show.Show Data.Text.ICU.Normalize.NormalizationMode

-- | Access to the Unicode Character Database, implemented as bindings to
--   the International Components for Unicode (ICU) libraries.
--   
--   Unicode assigns each codepoint (not just assigned character) values
--   for many properties. Most are simple boolean flags, or constants from
--   a small enumerated list. For some, values are relatively more complex
--   types.
--   
--   For more information see "About the Unicode Character Database"
--   http://www.unicode.org/ucd/ and the ICU User Guide chapter on
--   Properties http://icu-project.org/userguide/properties.html.
module Data.Text.ICU.Char
class Property p v | p -> v
data BidiClass_
BidiClass :: BidiClass_
data Block_
Block :: Block_
data Bool_
Alphabetic :: Bool_

-- | 0-9, A-F, a-f
ASCIIHexDigit :: Bool_

-- | Format controls which have specific functions in the Bidi Algorithm.
BidiControl :: Bool_

-- | Characters that may change display in RTL text.
BidiMirrored :: Bool_

-- | Variations of dashes.
Dash :: Bool_

-- | Ignorable in most processing.
DefaultIgnorable :: Bool_

-- | The usage of deprecated characters is strongly discouraged.
Deprecated :: Bool_

-- | Characters that linguistically modify the meaning of another character
--   to which they apply.
Diacritic :: Bool_

-- | Extend the value or shape of a preceding alphabetic character, e.g.
--   length and iteration marks.
Extender :: Bool_
FullCompositionExclusion :: Bool_

-- | For programmatic determination of grapheme cluster boundaries.
GraphemeBase :: Bool_

-- | For programmatic determination of grapheme cluster boundaries.
GraphemeExtend :: Bool_

-- | For programmatic determination of grapheme cluster boundaries.
GraphemeLink :: Bool_

-- | Characters commonly used for hexadecimal numbers.
HexDigit :: Bool_

-- | Dashes used to mark connections between pieces of words, plus the
--   Katakana middle dot.
Hyphen :: Bool_

-- | Characters that can continue an identifier.
IDContinue :: Bool_

-- | Characters that can start an identifier.
IDStart :: Bool_

-- | CJKV ideographs.
Ideographic :: Bool_

-- | For programmatic determination of Ideographic Description Sequences.
IDSBinaryOperator :: Bool_
IDSTrinaryOperator :: Bool_

-- | Format controls for cursive joining and ligation.
JoinControl :: Bool_

-- | Characters that do not use logical order and require special handling
--   in most processing.
LogicalOrderException :: Bool_
Lowercase :: Bool_
Math :: Bool_

-- | Code points that are explicitly defined as illegal for the encoding of
--   characters.
NonCharacter :: Bool_
QuotationMark :: Bool_

-- | For programmatic determination of Ideographic Description Sequences.
Radical :: Bool_

-- | Characters with a "soft dot", like i or j. An accent placed on these
--   characters causes the dot to disappear.
SoftDotted :: Bool_

-- | Punctuation characters that generally mark the end of textual units.
TerminalPunctuation :: Bool_

-- | For programmatic determination of Ideographic Description Sequences.
UnifiedIdeograph :: Bool_
Uppercase :: Bool_
WhiteSpace :: Bool_

-- | IDContinue modified to allow closure under normalization forms
--   NFKC and NFKD.
XidContinue :: Bool_

-- | IDStart modified to allow closure under normalization forms
--   NFKC and NFKD.
XidStart :: Bool_

-- | Either the source of a case mapping or in the target of a case
--   mapping. Not the same as the general category Cased_Letter.
CaseSensitive :: Bool_

-- | Sentence Terminal. Used in UAX #29: Text Boundaries
--   http://www.unicode.org/reports/tr29/.
STerm :: Bool_

-- | Indicates all those characters that qualify as Variation Selectors.
--   For details on the behavior of these characters, see
--   http://unicode.org/Public/UNIDATA/StandardizedVariants.html and
--   15.6 Variation Selectors.
VariationSelector :: Bool_

-- | ICU-specific property for characters that are inert under NFD, i.e.
--   they do not interact with adjacent characters. Used for example in
--   normalizing transforms in incremental mode to find the boundary of
--   safely normalizable text despite possible text additions.
NFDInert :: Bool_

-- | ICU-specific property for characters that are inert under NFKD, i.e.
--   they do not interact with adjacent characters.
NFKDInert :: Bool_

-- | ICU-specific property for characters that are inert under NFC, i.e.
--   they do not interact with adjacent characters.
NFCInert :: Bool_

-- | ICU-specific property for characters that are inert under NFKC, i.e.
--   they do not interact with adjacent characters.
NFKCInert :: Bool_

-- | ICU-specific property for characters that are starters in terms of
--   Unicode normalization and combining character sequences.
SegmentStarter :: Bool_

-- | See UAX #31 Identifier and Pattern Syntax
--   http://www.unicode.org/reports/tr31/.
PatternSyntax :: Bool_

-- | See UAX #31 Identifier and Pattern Syntax
--   http://www.unicode.org/reports/tr31/.
PatternWhiteSpace :: Bool_

-- | Alphanumeric character class.
POSIXAlNum :: Bool_

-- | Blank character class.
POSIXBlank :: Bool_

-- | Graph character class.
POSIXGraph :: Bool_

-- | Printable character class.
POSIXPrint :: Bool_

-- | Hex digit character class.
POSIXXDigit :: Bool_

-- | Cased character class. For lowercase, uppercase and titlecase
--   characters.
Cased :: Bool_

-- | Used in context-sensitive case mappings.
CaseIgnorable :: Bool_
ChangesWhenLowercased :: Bool_
ChangesWhenUppercased :: Bool_
ChangesWhenTitlecased :: Bool_
ChangesWhenCasefolded :: Bool_
ChangesWhenCasemapped :: Bool_
ChangesWhenNFKCCasefolded :: Bool_

-- | See http://www.unicode.org/reports/tr51/#Emoji_Properties
Emoji :: Bool_

-- | See http://www.unicode.org/reports/tr51/#Emoji_Properties
EmojiPresentation :: Bool_

-- | See http://www.unicode.org/reports/tr51/#Emoji_Properties
EmojiModifier :: Bool_

-- | See http://www.unicode.org/reports/tr51/#Emoji_Properties
EmojiModifierBase :: Bool_

-- | See http://www.unicode.org/reports/tr51/#Emoji_Properties
EmojiComponent :: Bool_
RegionalIndicator :: Bool_
PrependedConcatenationMark :: Bool_
ExtendedPictographic :: Bool_

-- | See https://www.unicode.org/reports/tr51/#Emoji_Sets
BasicEmoji :: Bool_

-- | See https://www.unicode.org/reports/tr51/#Emoji_Sets
EmojiKeycapSequence :: Bool_

-- | See https://www.unicode.org/reports/tr51/#Emoji_Sets
RgiEmojiModifierSequence :: Bool_

-- | See https://www.unicode.org/reports/tr51/#Emoji_Sets
RgiEmojiFlagSequence :: Bool_

-- | See https://www.unicode.org/reports/tr51/#Emoji_Sets
RgiEmojiTagSequence :: Bool_

-- | See https://www.unicode.org/reports/tr51/#Emoji_Sets
RgiEmojiZwjSequence :: Bool_

-- | See https://www.unicode.org/reports/tr51/#Emoji_Sets
RgiEmoji :: Bool_
data Decomposition_
Decomposition :: Decomposition_
data EastAsianWidth_
EastAsianWidth :: EastAsianWidth_
data GeneralCategory_
GeneralCategory :: GeneralCategory_
data HangulSyllableType_
HangulSyllableType :: HangulSyllableType_
data JoiningGroup_
JoiningGroup :: JoiningGroup_
data JoiningType_
JoiningType :: JoiningType_
data NumericType_
NumericType :: NumericType_
data CanonicalCombiningClass_
CanonicalCombiningClass :: CanonicalCombiningClass_
data LeadCanonicalCombiningClass_
LeadCanonicalCombiningClass :: LeadCanonicalCombiningClass_
data TrailingCanonicalCombiningClass_
TrailingCanonicalCombiningClass :: TrailingCanonicalCombiningClass_
data NFCQuickCheck_
NFCQuickCheck :: NFCQuickCheck_
data NFDQuickCheck_
NFDQuickCheck :: NFDQuickCheck_
data NFKCQuickCheck_
NFKCQuickCheck :: NFKCQuickCheck_
data NFKDQuickCheck_
NFKDQuickCheck :: NFKDQuickCheck_
data GraphemeClusterBreak_
GraphemeClusterBreak :: GraphemeClusterBreak_
data LineBreak_
LineBreak :: LineBreak_
data SentenceBreak_
SentenceBreak :: SentenceBreak_
data WordBreak_
WordBreak :: WordBreak_
data BidiPairedBracketType_
BidiPairedBracketType :: BidiPairedBracketType_

-- | Descriptions of Unicode blocks.
data BlockCode
NoBlock :: BlockCode
BasicLatin :: BlockCode
Latin1Supplement :: BlockCode
LatinExtendedA :: BlockCode
LatinExtendedB :: BlockCode
IPAExtensions :: BlockCode
SpacingModifierLetters :: BlockCode
CombiningDiacriticalMarks :: BlockCode
GreekAndCoptic :: BlockCode
Cyrillic :: BlockCode
Armenian :: BlockCode
Hebrew :: BlockCode
Arabic :: BlockCode
Syriac :: BlockCode
Thaana :: BlockCode
Devanagari :: BlockCode
Bengali :: BlockCode
Gurmukhi :: BlockCode
Gujarati :: BlockCode
Oriya :: BlockCode
Tamil :: BlockCode
Telugu :: BlockCode
Kannada :: BlockCode
Malayalam :: BlockCode
Sinhala :: BlockCode
Thai :: BlockCode
Lao :: BlockCode
Tibetan :: BlockCode
Myanmar :: BlockCode
Georgian :: BlockCode
HangulJamo :: BlockCode
Ethiopic :: BlockCode
Cherokee :: BlockCode
UnifiedCanadianAboriginalSyllabics :: BlockCode
Ogham :: BlockCode
Runic :: BlockCode
Khmer :: BlockCode
Mongolian :: BlockCode
LatinExtendedAdditional :: BlockCode
GreekExtended :: BlockCode
GeneralPunctuation :: BlockCode
SuperscriptsAndSubscripts :: BlockCode
CurrencySymbols :: BlockCode
CombiningDiacriticalMarksForSymbols :: BlockCode
LetterlikeSymbols :: BlockCode
NumberForms :: BlockCode
Arrows :: BlockCode
MathematicalOperators :: BlockCode
MiscellaneousTechnical :: BlockCode
ControlPictures :: BlockCode
OpticalCharacterRecognition :: BlockCode
EnclosedAlphanumerics :: BlockCode
BoxDrawing :: BlockCode
BlockElements :: BlockCode
GeometricShapes :: BlockCode
MiscellaneousSymbols :: BlockCode
Dingbats :: BlockCode
BraillePatterns :: BlockCode
CJKRadicalsSupplement :: BlockCode
KangxiRadicals :: BlockCode
IdeographicDescriptionCharacters :: BlockCode
CJKSymbolsAndPunctuation :: BlockCode
Hiragana :: BlockCode
Katakana :: BlockCode
Bopomofo :: BlockCode
HangulCompatibilityJamo :: BlockCode
Kanbun :: BlockCode
BopomofoExtended :: BlockCode
EnclosedCJKLettersAndMonths :: BlockCode
CJKCompatibility :: BlockCode
CJKUnifiedIdeographsExtensionA :: BlockCode
CJKUnifiedIdeographs :: BlockCode
YiSyllables :: BlockCode
YiRadicals :: BlockCode
HangulSyllables :: BlockCode
HighSurrogates :: BlockCode
HighPrivateUseSurrogates :: BlockCode
LowSurrogates :: BlockCode
PrivateUseArea :: BlockCode
CJKCompatibilityIdeographs :: BlockCode
AlphabeticPresentationForms :: BlockCode
ArabicPresentationFormsA :: BlockCode
CombiningHalfMarks :: BlockCode
CJKCompatibilityForms :: BlockCode
SmallFormVariants :: BlockCode
ArabicPresentationFormsB :: BlockCode
Specials :: BlockCode
HalfwidthAndFullwidthForms :: BlockCode
OldItalic :: BlockCode
Gothic :: BlockCode
Deseret :: BlockCode
ByzantineMusicalSymbols :: BlockCode
MusicalSymbols :: BlockCode
MathematicalAlphanumericSymbols :: BlockCode
CJKUnifiedIdeographsExtensionB :: BlockCode
CJKCompatibilityIdeographsSupplement :: BlockCode
Tags :: BlockCode
CyrillicSupplement :: BlockCode
Tagalog :: BlockCode
Hanunoo :: BlockCode
Buhid :: BlockCode
Tagbanwa :: BlockCode
MiscellaneousMathematicalSymbolsA :: BlockCode
SupplementalArrowsA :: BlockCode
SupplementalArrowsB :: BlockCode
MiscellaneousMathematicalSymbolsB :: BlockCode
SupplementalMathematicalOperators :: BlockCode
KatakanaPhoneticExtensions :: BlockCode
VariationSelectors :: BlockCode
SupplementaryPrivateUseAreaA :: BlockCode
SupplementaryPrivateUseAreaB :: BlockCode
Limbu :: BlockCode
TaiLe :: BlockCode
KhmerSymbols :: BlockCode
PhoneticExtensions :: BlockCode
MiscellaneousSymbolsAndArrows :: BlockCode
YijingHexagramSymbols :: BlockCode
LinearBSyllabary :: BlockCode
LinearBIdeograms :: BlockCode
AegeanNumbers :: BlockCode
Ugaritic :: BlockCode
Shavian :: BlockCode
Osmanya :: BlockCode
CypriotSyllabary :: BlockCode
TaiXuanJingSymbols :: BlockCode
VariationSelectorsSupplement :: BlockCode
AncientGreekMusicalNotation :: BlockCode
AncientGreekNumbers :: BlockCode
ArabicSupplement :: BlockCode
Buginese :: BlockCode
CJKStrokes :: BlockCode
CombiningDiacriticalMarksSupplement :: BlockCode
Coptic :: BlockCode
EthiopicExtended :: BlockCode
EthiopicSupplement :: BlockCode
GeorgianSupplement :: BlockCode
Glagolitic :: BlockCode
Kharoshthi :: BlockCode
ModifierToneLetters :: BlockCode
NewTaiLue :: BlockCode
OldPersian :: BlockCode
PhoneticExtensionsSupplement :: BlockCode
SupplementalPunctuation :: BlockCode
SylotiNagri :: BlockCode
Tifinagh :: BlockCode
VerticalForms :: BlockCode
N'Ko :: BlockCode
Balinese :: BlockCode
LatinExtendedC :: BlockCode
LatinExtendedD :: BlockCode
PhagsPa :: BlockCode
Phoenician :: BlockCode
Cuneiform :: BlockCode
CuneiformNumbersAndPunctuation :: BlockCode
CountingRodNumerals :: BlockCode
Sundanese :: BlockCode
Lepcha :: BlockCode
OlChiki :: BlockCode
CyrillicExtendedA :: BlockCode
Vai :: BlockCode
CyrillicExtendedB :: BlockCode
Saurashtra :: BlockCode
KayahLi :: BlockCode
Rejang :: BlockCode
Cham :: BlockCode
AncientSymbols :: BlockCode
PhaistosDisc :: BlockCode
Lycian :: BlockCode
Carian :: BlockCode
Lydian :: BlockCode
MahjongTiles :: BlockCode
DominoTiles :: BlockCode
Samaritan :: BlockCode
UnifiedCanadianAboriginalSyllabicsExtended :: BlockCode
TaiTham :: BlockCode
VedicExtensions :: BlockCode
Lisu :: BlockCode
Bamum :: BlockCode
CommonIndicNumberForms :: BlockCode
DevanagariExtended :: BlockCode
HangulJamoExtendedA :: BlockCode
Javanese :: BlockCode
MyanmarExtendedA :: BlockCode
TaiViet :: BlockCode
MeeteiMayek :: BlockCode
HangulJamoExtendedB :: BlockCode
ImperialAramaic :: BlockCode
OldSouthArabian :: BlockCode
Avestan :: BlockCode
InscriptionalParthian :: BlockCode
InscriptionalPahlavi :: BlockCode
OldTurkic :: BlockCode
RumiNumeralSymbols :: BlockCode
Kaithi :: BlockCode
EgyptianHieroglyphs :: BlockCode
EnclosedAlphanumericSupplement :: BlockCode
EnclosedIdeographicSupplement :: BlockCode
CJKUnifiedIdeographsExtensionC :: BlockCode
Mandaic :: BlockCode
Batak :: BlockCode
EthiopicExtendedA :: BlockCode
Brahmi :: BlockCode
BamumSupplement :: BlockCode
KanaSupplement :: BlockCode
PlayingCards :: BlockCode
MiscellaneousSymbolsAndPictographs :: BlockCode
Emoticons :: BlockCode
TransportAndMapSymbols :: BlockCode
AlchemicalSymbols :: BlockCode
CJKUnifiedIdeographsExtensionD :: BlockCode
ArabicExtendedA :: BlockCode
ArabicMathematicalAlphabeticSymbols :: BlockCode
Chakma :: BlockCode
MeeteiMayekExtensions :: BlockCode
MeroiticCursive :: BlockCode
MeroiticHieroglyphs :: BlockCode
Miao :: BlockCode
Sharada :: BlockCode
SoraSompeng :: BlockCode
SundaneseSupplement :: BlockCode
Takri :: BlockCode
BassaVah :: BlockCode
CaucasianAlbanian :: BlockCode
CopticEpactNumbers :: BlockCode
CombiningDiacriticalMarksExtended :: BlockCode
Duployan :: BlockCode
Elbasan :: BlockCode
GeometricShapesExtended :: BlockCode
Grantha :: BlockCode
Khojki :: BlockCode
Khudawadi :: BlockCode
LatinExtendedE :: BlockCode
LinearA :: BlockCode
Mahajani :: BlockCode
Manichaean :: BlockCode
MendeKikakui :: BlockCode
Modi :: BlockCode
Mro :: BlockCode
MyanmarExtendedB :: BlockCode
Nabataean :: BlockCode
OldNorthArabian :: BlockCode
OldPermic :: BlockCode
OrnamentalDingbats :: BlockCode
PahawhHmong :: BlockCode
Palmyrene :: BlockCode
PauCinHau :: BlockCode
PsalterPahlavi :: BlockCode
ShorthandFormatControls :: BlockCode
Siddham :: BlockCode
SinhalaArchaicNumbers :: BlockCode
SupplementalArrowsC :: BlockCode
Tirhuta :: BlockCode
WarangCiti :: BlockCode
Ahom :: BlockCode
AnatolianHieroglyphs :: BlockCode
CherokeeSupplement :: BlockCode
CJKUnifiedIdeographsExtensionE :: BlockCode
EarlyDynasticCuneiform :: BlockCode
Hatran :: BlockCode
Multani :: BlockCode
OldHungarian :: BlockCode
SupplementalSymbolsAndPictographs :: BlockCode
SuttonSignwriting :: BlockCode
Adlam :: BlockCode
Bhaiksuki :: BlockCode
CyrillicExtendedC :: BlockCode
GlagoliticSupplement :: BlockCode
IdeographicSymbolsAndPunctuation :: BlockCode
Marchen :: BlockCode
MongolianSupplement :: BlockCode
Newa :: BlockCode
Osage :: BlockCode
Tangut :: BlockCode
TangutComponents :: BlockCode
CjkUnifiedIdeographsExtensionF :: BlockCode
KanaExtendedA :: BlockCode
MasaramGondi :: BlockCode
Nushu :: BlockCode
Soyombo :: BlockCode
SyriacSupplement :: BlockCode
ZanabazarSquare :: BlockCode
ChessSymbols :: BlockCode
Dogra :: BlockCode
GeorgianExtended :: BlockCode
GunjalaGondi :: BlockCode
HanifiRohingya :: BlockCode
IndicSiyaqNumbers :: BlockCode
Makasar :: BlockCode
MayanNumerals :: BlockCode
Medefaidrin :: BlockCode
OldSogdian :: BlockCode
Sogdian :: BlockCode
EgyptianHieroglyphFormatControls :: BlockCode
Elymaic :: BlockCode
Nandinagari :: BlockCode
NyiakengPuachueHmong :: BlockCode
OttomanSiyaqNumbers :: BlockCode
SmallKanaExtension :: BlockCode
SymbolsAndPictographsExtendedA :: BlockCode
TamilSupplement :: BlockCode
Wancho :: BlockCode
Chorasmian :: BlockCode
CjkUnifiedIdeographsExtensionG :: BlockCode
DivesAkuru :: BlockCode
KhitanSmallScript :: BlockCode
LisuSupplement :: BlockCode
SymbolsForLegacyComputing :: BlockCode
TangutSupplement :: BlockCode
Yezidi :: BlockCode
ArabicExtendedB :: BlockCode
CyproMinoan :: BlockCode
EthiopicExtendedB :: BlockCode
KanaExtendedB :: BlockCode
LatinExtendedF :: BlockCode
LatinExtendedG :: BlockCode
OldUyghur :: BlockCode
Tangsa :: BlockCode
Toto :: BlockCode
UnifiedCanadianAboriginalSyllabicsExtendedA :: BlockCode
Vithkuqi :: BlockCode
ZnamennyMusicalNotation :: BlockCode
ArabicExtendedC :: BlockCode
CjkUnifiedIdeographsExtensionH :: BlockCode
CyrillicExtendedD :: BlockCode
DevanagariExtendedA :: BlockCode
KaktovikNumerals :: BlockCode
Kawi :: BlockCode
NagMundari :: BlockCode

-- | The language directional property of a character set.
data Direction
LeftToRight :: Direction
RightToLeft :: Direction
EuropeanNumber :: Direction
EuropeanNumberSeparator :: Direction
EuropeanNumberTerminator :: Direction
ArabicNumber :: Direction
CommonNumberSeparator :: Direction
BlockSeparator :: Direction
SegmentSeparator :: Direction
WhiteSpaceNeutral :: Direction
OtherNeutral :: Direction
LeftToRightEmbedding :: Direction
LeftToRightOverride :: Direction
RightToLeftArabic :: Direction
RightToLeftEmbedding :: Direction
RightToLeftOverride :: Direction
PopDirectionalFormat :: Direction
DirNonSpacingMark :: Direction
BoundaryNeutral :: Direction
FirstStrongIsolate :: Direction
LeftToRightIsolate :: Direction
RightToLeftIsolate :: Direction
PopDirectionalIsolate :: Direction
data Decomposition
Canonical :: Decomposition
Compat :: Decomposition
Circle :: Decomposition
Final :: Decomposition
Font :: Decomposition
Fraction :: Decomposition
Initial :: Decomposition
Isolated :: Decomposition
Medial :: Decomposition
Narrow :: Decomposition
NoBreak :: Decomposition
Small :: Decomposition
Square :: Decomposition
Sub :: Decomposition
Super :: Decomposition
Vertical :: Decomposition
Wide :: Decomposition
Count :: Decomposition
data EastAsianWidth
EANeutral :: EastAsianWidth
EAAmbiguous :: EastAsianWidth
EAHalf :: EastAsianWidth
EAFull :: EastAsianWidth
EANarrow :: EastAsianWidth
EAWide :: EastAsianWidth
EACount :: EastAsianWidth
data GeneralCategory

-- | U_GENERAL_OTHER_TYPES is the same as U_UNASSIGNED
GeneralOtherType :: GeneralCategory
UppercaseLetter :: GeneralCategory
LowercaseLetter :: GeneralCategory
TitlecaseLetter :: GeneralCategory
ModifierLetter :: GeneralCategory
OtherLetter :: GeneralCategory
NonSpacingMark :: GeneralCategory
EnclosingMark :: GeneralCategory
CombiningSpacingMark :: GeneralCategory
DecimalDigitNumber :: GeneralCategory
LetterNumber :: GeneralCategory
OtherNumber :: GeneralCategory
SpaceSeparator :: GeneralCategory
LineSeparator :: GeneralCategory
ParagraphSeparator :: GeneralCategory
ControlChar :: GeneralCategory
FormatChar :: GeneralCategory
PrivateUseChar :: GeneralCategory
Surrogate :: GeneralCategory
DashPunctuation :: GeneralCategory
StartPunctuation :: GeneralCategory
EndPunctuation :: GeneralCategory
ConnectorPunctuation :: GeneralCategory
OtherPunctuation :: GeneralCategory
MathSymbol :: GeneralCategory
CurrencySymbol :: GeneralCategory
ModifierSymbol :: GeneralCategory
OtherSymbol :: GeneralCategory
InitialPunctuation :: GeneralCategory
FinalPunctuation :: GeneralCategory
data HangulSyllableType
LeadingJamo :: HangulSyllableType
VowelJamo :: HangulSyllableType
TrailingJamo :: HangulSyllableType
LVSyllable :: HangulSyllableType
LVTSyllable :: HangulSyllableType
data JoiningGroup
Ain :: JoiningGroup
Alaph :: JoiningGroup
Alef :: JoiningGroup
Beh :: JoiningGroup
Beth :: JoiningGroup
Dal :: JoiningGroup
DalathRish :: JoiningGroup
E :: JoiningGroup
Feh :: JoiningGroup
FinalSemkath :: JoiningGroup
Gaf :: JoiningGroup
Gamal :: JoiningGroup
Hah :: JoiningGroup
HamzaOnHehGoal :: JoiningGroup
He :: JoiningGroup
Heh :: JoiningGroup
HehGoal :: JoiningGroup
Heth :: JoiningGroup
Kaf :: JoiningGroup
Kaph :: JoiningGroup
KnottedHeh :: JoiningGroup
Lam :: JoiningGroup
Lamadh :: JoiningGroup
Meem :: JoiningGroup
Mim :: JoiningGroup
Noon :: JoiningGroup
Nun :: JoiningGroup
Pe :: JoiningGroup
Qaf :: JoiningGroup
Qaph :: JoiningGroup
Reh :: JoiningGroup
ReversedPe :: JoiningGroup
Sad :: JoiningGroup
Sadhe :: JoiningGroup
Seen :: JoiningGroup
Semkath :: JoiningGroup
Shin :: JoiningGroup
SwashKaf :: JoiningGroup
SyriacWaw :: JoiningGroup
Tah :: JoiningGroup
Taw :: JoiningGroup
TehMarbuta :: JoiningGroup
Teth :: JoiningGroup
Waw :: JoiningGroup
Yeh :: JoiningGroup
YehBarree :: JoiningGroup
YehWithTail :: JoiningGroup
Yudh :: JoiningGroup
YudhHe :: JoiningGroup
Zain :: JoiningGroup
Fe :: JoiningGroup
Khaph :: JoiningGroup
Zhain :: JoiningGroup
BurushaskiYehBarree :: JoiningGroup
FarsiYeh :: JoiningGroup
Nya :: JoiningGroup
RohingyaYeh :: JoiningGroup
ManichaeanAleph :: JoiningGroup
ManichaeanAyin :: JoiningGroup
ManichaeanBeth :: JoiningGroup
ManichaeanDaleth :: JoiningGroup
ManichaeanDhamedh :: JoiningGroup
ManichaeanFive :: JoiningGroup
ManichaeanGimel :: JoiningGroup
ManichaeanHeth :: JoiningGroup
ManichaeanHundred :: JoiningGroup
ManichaeanKaph :: JoiningGroup
ManichaeanLamedh :: JoiningGroup
ManichaeanMem :: JoiningGroup
ManichaeanNun :: JoiningGroup
ManichaeanOne :: JoiningGroup
ManichaeanPe :: JoiningGroup
ManichaeanQoph :: JoiningGroup
ManichaeanResh :: JoiningGroup
ManichaeanSadhe :: JoiningGroup
ManichaeanSamekh :: JoiningGroup
ManichaeanTaw :: JoiningGroup
ManichaeanTen :: JoiningGroup
ManichaeanTeth :: JoiningGroup
ManichaeanThamedh :: JoiningGroup
ManichaeanTwenty :: JoiningGroup
ManichaeanWaw :: JoiningGroup
ManichaeanYodh :: JoiningGroup
ManichaeanZayin :: JoiningGroup
StraightWaw :: JoiningGroup
data JoiningType
JoinCausing :: JoiningType
DualJoining :: JoiningType
LeftJoining :: JoiningType
RightJoining :: JoiningType
Transparent :: JoiningType
data NumericType
NTDecimal :: NumericType
NTDigit :: NumericType
NTNumeric :: NumericType
data GraphemeClusterBreak
GCBControl :: GraphemeClusterBreak
GCBCR :: GraphemeClusterBreak
GCBExtend :: GraphemeClusterBreak
GCBL :: GraphemeClusterBreak
GCBLF :: GraphemeClusterBreak
GCBLV :: GraphemeClusterBreak
GCBLVT :: GraphemeClusterBreak
GCBT :: GraphemeClusterBreak
GCBV :: GraphemeClusterBreak
GCBSpacingMark :: GraphemeClusterBreak
GCBPrepend :: GraphemeClusterBreak
GCBRegionalIndicator :: GraphemeClusterBreak
GCBEBase :: GraphemeClusterBreak
GCBEBaseGAZ :: GraphemeClusterBreak
GCBEModifier :: GraphemeClusterBreak
GCBGlueAfterZWJ :: GraphemeClusterBreak
GCBZWJ :: GraphemeClusterBreak
data LineBreak
Ambiguous :: LineBreak
LBAlphabetic :: LineBreak
BreakBoth :: LineBreak
BreakAfter :: LineBreak
BreakBefore :: LineBreak
MandatoryBreak :: LineBreak
ContingentBreak :: LineBreak
ClosePunctuation :: LineBreak
CombiningMark :: LineBreak
CarriageReturn :: LineBreak
Exclamation :: LineBreak
Glue :: LineBreak
LBHyphen :: LineBreak
LBIdeographic :: LineBreak
Inseparable :: LineBreak
InfixNumeric :: LineBreak
LineFeed :: LineBreak
Nonstarter :: LineBreak
Numeric :: LineBreak
OpenPunctuation :: LineBreak
PostfixNumeric :: LineBreak
PrefixNumeric :: LineBreak
Quotation :: LineBreak
ComplexContext :: LineBreak
LBSurrogate :: LineBreak
Space :: LineBreak
BreakSymbols :: LineBreak
Zwspace :: LineBreak
NextLine :: LineBreak
WordJoiner :: LineBreak
H2 :: LineBreak
H3 :: LineBreak
JL :: LineBreak
JT :: LineBreak
JV :: LineBreak
CloseParenthesis :: LineBreak
ConditionalJapaneseStarter :: LineBreak
LBHebrewLetter :: LineBreak
LBRegionalIndicator :: LineBreak
EBase :: LineBreak
EModifier :: LineBreak
ZWJ :: LineBreak
data SentenceBreak
SBATerm :: SentenceBreak
SBClose :: SentenceBreak
SBFormat :: SentenceBreak
SBLower :: SentenceBreak
SBNumeric :: SentenceBreak
SBOLetter :: SentenceBreak
SBSep :: SentenceBreak
SBSP :: SentenceBreak
SBSTerm :: SentenceBreak
SBUpper :: SentenceBreak
SBCR :: SentenceBreak
SBExtend :: SentenceBreak
SBLF :: SentenceBreak
SBSContinue :: SentenceBreak
data WordBreak
WBALetter :: WordBreak
WBFormat :: WordBreak
WBKatakana :: WordBreak
WBMidLetter :: WordBreak
WBMidNum :: WordBreak
WBNumeric :: WordBreak
WBExtendNumLet :: WordBreak
WBCR :: WordBreak
WBExtend :: WordBreak
WBLF :: WordBreak
WBMidNumLet :: WordBreak
WBNewline :: WordBreak
WBRegionalIndicator :: WordBreak
WBHebrewLetter :: WordBreak
WBSingleQuote :: WordBreak
WBDoubleQuote :: WordBreak
data BidiPairedBracketType
BPTNone :: BidiPairedBracketType
BPTOpen :: BidiPairedBracketType
BPTClose :: BidiPairedBracketType

-- | Return the Unicode allocation block that contains the given character.
blockCode :: Char -> BlockCode

-- | Return the full name of a Unicode character.
--   
--   Compared to charName, this function gives each Unicode
--   codepoint a unique extended name. Extended names are lowercase
--   followed by an uppercase hexadecimal number, within angle brackets.
charFullName :: Char -> String

-- | Return the name of a Unicode character.
--   
--   The names of all unassigned characters are empty.
--   
--   The name contains only "invariant" characters like A-Z, 0-9, space,
--   and '-'.
charName :: Char -> String

-- | Find a Unicode character by its full or extended name, and return its
--   codepoint value.
--   
--   The name is matched exactly and completely.
--   
--   A Unicode 1.0 name is matched only if it differs from the modern name.
--   
--   Compared to charFromName, this function gives each Unicode code
--   point a unique extended name. Extended names are lowercase followed by
--   an uppercase hexadecimal number, within angle brackets.
charFromFullName :: String -> Maybe Char

-- | Find a Unicode character by its full name, and return its code point
--   value.
--   
--   The name is matched exactly and completely.
--   
--   A Unicode 1.0 name is matched only if it differs from the modern name.
--   Unicode names are all uppercase.
charFromName :: String -> Maybe Char
combiningClass :: Char -> Int

-- | Return the bidirectional category value for the codepoint, which is
--   used in the Unicode bidirectional algorithm (UAX #9
--   http://www.unicode.org/reports/tr9/).
direction :: Char -> Direction
property :: Property p v => p -> Char -> v

-- | Determine whether the codepoint has the BidiMirrored property.
--   This property is set for characters that are commonly used in
--   Right-To-Left contexts and need to be displayed with a "mirrored"
--   glyph.
isMirrored :: Char -> Bool
mirror :: Char -> Char

-- | Return the decimal digit value of a decimal digit character. Such
--   characters have the general category Nd (decimal digit
--   numbers) and a NumericType of NTDecimal.
--   
--   No digit values are returned for any Han characters, because Han
--   number characters are often used with a special Chinese-style number
--   format (with characters for powers of 10 in between) instead of in
--   decimal-positional notation. Unicode 4 explicitly assigns Han number
--   characters a NumericType of NTNumeric instead of
--   NTDecimal.
digitToInt :: Char -> Maybe Int

-- | Return the numeric value for a Unicode codepoint as defined in the
--   Unicode Character Database.
--   
--   A Double return type is necessary because some numeric values
--   are fractions, negative, or too large to fit in a fixed-width integral
--   type.
numericValue :: Char -> Maybe Double
instance GHC.Internal.Enum.Bounded Data.Text.ICU.Char.BlockCode
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.BidiPairedBracketType
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.BlockCode
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.Bool_
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.Decomposition
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.Direction
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.EastAsianWidth
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.GeneralCategory
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.GraphemeClusterBreak
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.HangulSyllableType
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.JoiningGroup
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.JoiningType
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.LineBreak
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.NumericType
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.SentenceBreak
instance GHC.Internal.Enum.Enum Data.Text.ICU.Char.WordBreak
instance GHC.Classes.Eq Data.Text.ICU.Char.BidiPairedBracketType
instance GHC.Classes.Eq Data.Text.ICU.Char.BlockCode
instance GHC.Classes.Eq Data.Text.ICU.Char.Bool_
instance GHC.Classes.Eq Data.Text.ICU.Char.Decomposition
instance GHC.Classes.Eq Data.Text.ICU.Char.Direction
instance GHC.Classes.Eq Data.Text.ICU.Char.EastAsianWidth
instance GHC.Classes.Eq Data.Text.ICU.Char.GeneralCategory
instance GHC.Classes.Eq Data.Text.ICU.Char.GraphemeClusterBreak
instance GHC.Classes.Eq Data.Text.ICU.Char.HangulSyllableType
instance GHC.Classes.Eq Data.Text.ICU.Char.JoiningGroup
instance GHC.Classes.Eq Data.Text.ICU.Char.JoiningType
instance GHC.Classes.Eq Data.Text.ICU.Char.LineBreak
instance GHC.Classes.Eq Data.Text.ICU.Char.NumericType
instance GHC.Classes.Eq Data.Text.ICU.Char.SentenceBreak
instance GHC.Classes.Eq Data.Text.ICU.Char.WordBreak
instance Control.DeepSeq.NFData Data.Text.ICU.Char.BidiClass_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.BidiPairedBracketType
instance Control.DeepSeq.NFData Data.Text.ICU.Char.BidiPairedBracketType_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.BlockCode
instance Control.DeepSeq.NFData Data.Text.ICU.Char.Block_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.Bool_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.CanonicalCombiningClass_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.Decomposition
instance Control.DeepSeq.NFData Data.Text.ICU.Char.Decomposition_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.Direction
instance Control.DeepSeq.NFData Data.Text.ICU.Char.EastAsianWidth
instance Control.DeepSeq.NFData Data.Text.ICU.Char.EastAsianWidth_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.GeneralCategory
instance Control.DeepSeq.NFData Data.Text.ICU.Char.GeneralCategory_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.GraphemeClusterBreak
instance Control.DeepSeq.NFData Data.Text.ICU.Char.GraphemeClusterBreak_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.HangulSyllableType
instance Control.DeepSeq.NFData Data.Text.ICU.Char.HangulSyllableType_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.JoiningGroup
instance Control.DeepSeq.NFData Data.Text.ICU.Char.JoiningGroup_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.JoiningType
instance Control.DeepSeq.NFData Data.Text.ICU.Char.JoiningType_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.LeadCanonicalCombiningClass_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.LineBreak
instance Control.DeepSeq.NFData Data.Text.ICU.Char.LineBreak_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.NFCQuickCheck_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.NFDQuickCheck_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.NFKCQuickCheck_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.NFKDQuickCheck_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.NumericType
instance Control.DeepSeq.NFData Data.Text.ICU.Char.NumericType_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.SentenceBreak
instance Control.DeepSeq.NFData Data.Text.ICU.Char.SentenceBreak_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.TrailingCanonicalCombiningClass_
instance Control.DeepSeq.NFData Data.Text.ICU.Char.WordBreak
instance Control.DeepSeq.NFData Data.Text.ICU.Char.WordBreak_
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.BidiClass_ Data.Text.ICU.Char.Direction
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.BidiPairedBracketType_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.BidiPairedBracketType)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.Block_ Data.Text.ICU.Char.BlockCode
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.Bool_ GHC.Types.Bool
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.CanonicalCombiningClass_ GHC.Types.Int
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.Decomposition_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.Decomposition)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.EastAsianWidth_ Data.Text.ICU.Char.EastAsianWidth
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.GeneralCategory_ Data.Text.ICU.Char.GeneralCategory
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.GraphemeClusterBreak_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.GraphemeClusterBreak)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.HangulSyllableType_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.HangulSyllableType)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.JoiningGroup_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.JoiningGroup)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.JoiningType_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.JoiningType)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.LeadCanonicalCombiningClass_ GHC.Types.Int
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.LineBreak_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.LineBreak)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.NFCQuickCheck_ (GHC.Internal.Maybe.Maybe GHC.Types.Bool)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.NFDQuickCheck_ (GHC.Internal.Maybe.Maybe GHC.Types.Bool)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.NFKCQuickCheck_ (GHC.Internal.Maybe.Maybe GHC.Types.Bool)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.NFKDQuickCheck_ (GHC.Internal.Maybe.Maybe GHC.Types.Bool)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.NumericType_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.NumericType)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.SentenceBreak_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.SentenceBreak)
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.TrailingCanonicalCombiningClass_ GHC.Types.Int
instance Data.Text.ICU.Char.Property Data.Text.ICU.Char.WordBreak_ (GHC.Internal.Maybe.Maybe Data.Text.ICU.Char.WordBreak)
instance GHC.Internal.Show.Show Data.Text.ICU.Char.BidiClass_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.BidiPairedBracketType
instance GHC.Internal.Show.Show Data.Text.ICU.Char.BidiPairedBracketType_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.BlockCode
instance GHC.Internal.Show.Show Data.Text.ICU.Char.Bool_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.CanonicalCombiningClass_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.Decomposition
instance GHC.Internal.Show.Show Data.Text.ICU.Char.Decomposition_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.Direction
instance GHC.Internal.Show.Show Data.Text.ICU.Char.EastAsianWidth
instance GHC.Internal.Show.Show Data.Text.ICU.Char.EastAsianWidth_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.GeneralCategory
instance GHC.Internal.Show.Show Data.Text.ICU.Char.GeneralCategory_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.GraphemeClusterBreak
instance GHC.Internal.Show.Show Data.Text.ICU.Char.GraphemeClusterBreak_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.HangulSyllableType
instance GHC.Internal.Show.Show Data.Text.ICU.Char.HangulSyllableType_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.JoiningGroup
instance GHC.Internal.Show.Show Data.Text.ICU.Char.JoiningGroup_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.JoiningType
instance GHC.Internal.Show.Show Data.Text.ICU.Char.JoiningType_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.LeadCanonicalCombiningClass_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.LineBreak
instance GHC.Internal.Show.Show Data.Text.ICU.Char.LineBreak_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.NFCQuickCheck_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.NFDQuickCheck_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.NFKCQuickCheck_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.NFKDQuickCheck_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.NumericType
instance GHC.Internal.Show.Show Data.Text.ICU.Char.NumericType_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.SentenceBreak
instance GHC.Internal.Show.Show Data.Text.ICU.Char.SentenceBreak_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.TrailingCanonicalCombiningClass_
instance GHC.Internal.Show.Show Data.Text.ICU.Char.WordBreak
instance GHC.Internal.Show.Show Data.Text.ICU.Char.WordBreak_

-- | Character set normalization functions for Unicode, implemented as
--   bindings to the International Components for Unicode (ICU) libraries.
--   See http://www.unicode.org/reports/tr15/ for a description of
--   Unicode normalization modes and why these are needed.
module Data.Text.ICU.Normalize2

-- | Normalization modes analog (but not identical) to the ones in the
--   Normalize module.
data NormalizationMode

-- | Canonical decomposition.
NFD :: NormalizationMode

-- | Compatibility decomposition.
NFKD :: NormalizationMode

-- | Canonical decomposition followed by canonical composition.
NFC :: NormalizationMode

-- | Compatibility decomposition followed by canonical composition.
NFKC :: NormalizationMode

-- | NFKC with Casefold.
NFKCCasefold :: NormalizationMode

-- | Create a normalizer for a given normalization mode. This function is
--   more similar to the interface in the Normalize module.
normalizer :: NormalizationMode -> IO Normalizer

-- | Create an NFC normalizer.
nfcNormalizer :: IO Normalizer

-- | Create an NFD normalizer.
nfdNormalizer :: IO Normalizer

-- | Create an NFKC normalizer.
nfkcNormalizer :: IO Normalizer

-- | Create an NFKD normalizer.
nfkdNormalizer :: IO Normalizer

-- | Create an NFKCCasefold normalizer.
nfkcCasefoldNormalizer :: IO Normalizer

-- | Create an NFC normalizer and apply this to the given text.
--   
--   Let's have a look at a concrete example that contains the letter a
--   with an acute accent twice. First as a combination of two codepoints
--   and second as a canonical composite or precomposed character. Both
--   look exactly the same but one character consists of two and one of
--   only one codepoint. A bytewise comparison does not give equality of
--   these.
--   
--   
--   >>> import Data.Text
--   
--   >>> let t = pack "a\x301á"
--   
--   >>> t
--   "a\769\225"
--   
--   >>> putStr t
--   áá
--   pack "a\x301" == pack "á"
--   False
--   
--   
--   But now lets apply some normalization functions and see how these
--   characters coincide afterwards in two different ways:
--   
--   
--   >>> nfc t
--   "\225\225"
--   
--   >>> nfd t
--   "a\769a\769"
--   
--   
--   That is exactly what compareUnicode' does:
--   
--   
--   >>> pack "a\x301" `compareUnicode'` pack "á"
--   
nfc :: Text -> Text

-- | Create an NFD normalizer and apply this to the given text.
nfd :: Text -> Text

-- | Create an NFKC normalizer and apply this to the given text.
nfkc :: Text -> Text

-- | Create an NFC normalizer and apply this to the given text.
nfkd :: Text -> Text

-- | Create an NFKCCasefold normalizer and apply this to the given text.
nfkcCasefold :: Text -> Text

-- | Normalize a string using the given normalization mode.
normalize :: NormalizationMode -> Text -> Text

-- | Normalize a string with the given normalizer.
normalizeWith :: Normalizer -> Text -> Text
quickCheck :: NormalizationMode -> Text -> Maybe Bool
isNormalized :: NormalizationMode -> Text -> Bool

-- | Indicate whether a string is in a given normalization form.
--   
--   Unlike quickCheck, this function returns a definitive result.
--   For NFD and NFKD normalization forms, both functions
--   work in exactly the same ways. For NFC and NFKC forms,
--   where quickCheck may return Nothing, this function will
--   perform further tests to arrive at a definitive result.
isNormalizedWith :: Normalizer -> Text -> Bool

-- | Compare two strings for canonical equivalence. Further options include
--   case-insensitive comparison and codepoint order (as opposed to code
--   unit order).
--   
--   Canonical equivalence between two strings is defined as their
--   normalized forms (NFD or NFC) being identical. This
--   function compares strings incrementally instead of normalizing (and
--   optionally case-folding) both strings entirely, improving performance
--   significantly.
--   
--   Bulk normalization is only necessary if the strings do not fulfill the
--   FCD conditions. Only in this case, and only if the strings
--   are relatively long, is memory allocated temporarily. For FCD
--   strings and short non-FCD strings there is no memory
--   allocation.
compareUnicode :: [CompareOption] -> Text -> Text -> Ordering

-- | This is equivalent to `compareUnicode []`.
compareUnicode' :: Text -> Text -> Ordering

-- | Options to compare.
data CompareOption

-- | The caller knows that both strings fulfill the FCD
--   conditions. If not set, compare will quickCheck
--   for FCD and normalize if necessary.
InputIsFCD :: CompareOption

-- | Compare strings case-insensitively using case folding, instead of
--   case-sensitively. If set, then the following case folding options are
--   used.
CompareIgnoreCase :: CompareOption

-- | When case folding, exclude the special I character. For use with
--   Turkic (Turkish/Azerbaijani) text data.
FoldCaseExcludeSpecialI :: CompareOption
instance GHC.Internal.Enum.Enum Data.Text.ICU.Normalize2.CompareOption
instance GHC.Internal.Enum.Enum Data.Text.ICU.Normalize2.NormalizationMode
instance GHC.Classes.Eq Data.Text.ICU.Normalize2.CompareOption
instance GHC.Classes.Eq Data.Text.ICU.Normalize2.NormalizationMode
instance GHC.Internal.Show.Show Data.Text.ICU.Normalize2.CompareOption
instance GHC.Internal.Show.Show Data.Text.ICU.Normalize2.NormalizationMode

-- | New users with are strongly encouraged to see if
--   Data.Text.ICU.NumberFormatter fits their use case. Although not
--   deprecated, this header is provided for backwards compatibility only.
module Data.Text.ICU.Number

-- | Create and return a new NumberFormat for formatting and parsing
--   numbers.
--   
--   A NumberFormat may be used to format numbers by calling unum_format,
--   and to parse numbers by calling unum_parse. The caller must call
--   unum_close when done to release resources used by this object.
numberFormatter :: NumberFormatStyle -> LocaleName -> NumberFormat

-- | Format an integer using a NumberFormat.
--   
--   The integer will be formatted according to the UNumberFormat's locale.
class FormattableNumber n
formatNumber :: FormattableNumber n => NumberFormat -> n -> Text

-- | Create a formatter and apply it in one step.
formatNumber' :: FormattableNumber n => NumberFormatStyle -> LocaleName -> n -> Text

-- | The possible number format styles.
data NumberFormatStyle

-- | Decimal format defined by a pattern string. See the section "Patterns"
--   at
--   https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classDecimalFormat.html#Patterns
--   for further details regarding pattern strings.
NUM_PATTERN_DECIMAL :: Text -> NumberFormatStyle

-- | Decimal format ("normal" style).
NUM_DECIMAL :: NumberFormatStyle

-- | Currency format (generic). Defaults to UNUM_CURRENCY_STANDARD style
--   (using currency symbol, e.g., "$1.00", with non-accounting style for
--   negative values e.g. using minus sign). The specific style may be
--   specified using the -cf- locale key.
NUM_CURRENCY :: NumberFormatStyle

-- | Percent format.
NUM_PERCENT :: NumberFormatStyle

-- | Scientific format.
NUM_SCIENTIFIC :: NumberFormatStyle

-- | Spellout rule-based format. The default ruleset can be
--   specified/changed using unum_setTextAttribute with
--   UNUM_DEFAULT_RULESET; the available public rulesets can be listed
--   using unum_getTextAttribute with UNUM_PUBLIC_RULESETS.
NUM_SPELLOUT :: NumberFormatStyle

-- | Ordinal rule-based format. The default ruleset can be
--   specified/changed using unum_setTextAttribute with
--   UNUM_DEFAULT_RULESET; the available public rulesets can be listed
--   using unum_getTextAttribute with UNUM_PUBLIC_RULESETS.
NUM_ORDINAL :: NumberFormatStyle

-- | Duration rule-based format.
NUM_DURATION :: NumberFormatStyle

-- | Numbering system rule-based format.
NUM_NUMBERING_SYSTEM :: NumberFormatStyle

-- | Rule-based format defined by a pattern string. See the section
--   "Patterns" at
--   https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classDecimalFormat.html#Patterns
--   for further details regarding pattern strings.
NUM_PATTERN_RULEBASED :: Text -> NumberFormatStyle

-- | Currency format with an ISO currency code, e.g., "USD1.00".
NUM_CURRENCY_ISO :: NumberFormatStyle

-- | Currency format with a pluralized currency name, e.g., "1.00 US
--   dollar" and "3.00 US dollars".
NUM_CURRENCY_PLURAL :: NumberFormatStyle

-- | Currency format for accounting, e.g., "($3.00)" for negative currency
--   amount instead of "-$3.00" (UNUM_CURRENCY). Overrides any style
--   specified using -cf- key in locale.
NUM_CURRENCY_ACCOUNTING :: NumberFormatStyle

-- | Currency format with a currency symbol given CASH usage, e.g., "NT$3"
--   instead of "NT$3.23".
NUM_CASH_CURRENCY :: NumberFormatStyle

-- | Decimal format expressed using compact notation (short form,
--   corresponds to UNumberCompactStyle=UNUM_SHORT) e.g. "23K", "45B"
NUM_DECIMAL_COMPACT_SHORT :: NumberFormatStyle

-- | Decimal format expressed using compact notation (long form,
--   corresponds to UNumberCompactStyle=UNUM_LONG) e.g. "23 thousand", "45
--   billion"
NUM_DECIMAL_COMPACT_LONG :: NumberFormatStyle

-- | Currency format with a currency symbol, e.g., "$1.00", using
--   non-accounting style for negative values (e.g. minus sign). Overrides
--   any style specified using -cf- key in locale.
NUM_CURRENCY_STANDARD :: NumberFormatStyle

-- | One more than the highest normal UNumberFormatStyle value. Deprecated:
--   ICU 58 The numeric value may change over time, see ICU ticket #12420.
NUM_FORMAT_STYLE_COUNT :: NumberFormatStyle

-- | Default format.
NUM_DEFAULT :: NumberFormatStyle

-- | Alias for NUM_PATTERN_DECIMAL.
NUM_IGNORE :: NumberFormatStyle

-- | This is the number formatter. It can be created with
--   formatter. Use it to format numbers with the format
--   function.
data NumberFormat
instance GHC.Classes.Eq Data.Text.ICU.Number.NumberFormatStyle
instance Data.Text.ICU.Number.FormattableNumber GHC.Types.Double
instance Data.Text.ICU.Number.FormattableNumber GHC.Types.Float
instance Data.Text.ICU.Number.FormattableNumber GHC.Types.Int
instance Data.Text.ICU.Number.FormattableNumber GHC.Num.Integer.Integer
instance Data.Text.ICU.Number.FormattableNumber GHC.Num.Natural.Natural
instance GHC.Internal.Show.Show Data.Text.ICU.Number.NumberFormatStyle

-- | Number formatter implemented as bindings to the International
--   Components for Unicode (ICU) libraries.
module Data.Text.ICU.NumberFormatter
data NumberFormatter

-- | Create a new NumberFormatter.
--   
--   See
--   https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
--   for how to specify the number skeletons. And use
--   availableLocales in order to find the allowed locale names.
--   These usuallly look like "en", "de", "de_AT" etc. See
--   formatIntegral and formatDouble for some examples.
numberFormatter :: Text -> LocaleName -> IO NumberFormatter

-- | Format an integral number.
--   
--   See
--   https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
--   for how to specify the number skeletons.
--   
--   
--   >>> import Data.Text
--   
--   >>> nf <- numberFormatter (pack "precision-integer") (Locale "de")
--   
--   >>> formatIntegral nf 12345
--   "12.345"
--   
--   >>> nf2 <- numberFormatter (pack "precision-integer") (Locale "fr")
--   
--   >>> formatIntegral nf2 12345
--   "12\8239\&345"
--   
formatIntegral :: Integral a => NumberFormatter -> a -> Text

-- | Create a number formatter and apply it to an integral number.
formatIntegral' :: Integral a => Text -> LocaleName -> a -> Text

-- | Format a Double.
--   
--   See
--   https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
--   for how to specify the number skeletons.
--   
--   
--   >>> import Data.Text
--   
--   >>> nf3 <- numberFormatter (pack "precision-currency-cash") (Locale "it")
--   
--   >>> formatDouble nf3 12345.6789
--   "12.345,68"
--   
formatDouble :: NumberFormatter -> Double -> Text

-- | Create a number formatter and apply it to a Double.
formatDouble' :: Text -> LocaleName -> Double -> Text

-- | Regular expression support for Unicode, implemented as bindings to the
--   International Components for Unicode (ICU) libraries.
--   
--   The syntax and behaviour of ICU regular expressions are Perl-like. For
--   complete details, see the ICU User Guide entry at
--   http://userguide.icu-project.org/strings/regexp.
--   
--   Note: The functions in this module are not thread safe. For
--   thread safe use, see clone below, or use the pure functions in
--   Data.Text.ICU.
module Data.Text.ICU.Regex

-- | Options for controlling matching behaviour.
data MatchOption

-- | Enable case insensitive matching.
CaseInsensitive :: MatchOption

-- | Allow comments and white space within patterns.
Comments :: MatchOption

-- | If set, '.' matches line terminators. Otherwise '.'
--   matching stops at line end.
DotAll :: MatchOption

-- | If set, treat the entire pattern as a literal string. Metacharacters
--   or escape sequences in the input sequence will be given no special
--   meaning.
--   
--   The option CaseInsensitive retains its meanings on matching
--   when used in conjunction with this option. Other options become
--   superfluous.
Literal :: MatchOption

-- | Control behaviour of '$' and '^'. If set, recognize
--   line terminators within string, Otherwise, match only at start and end
--   of input string.
Multiline :: MatchOption

-- | Haskell-only line endings. When this mode is enabled, only
--   '\n' is recognized as a line ending in the behavior of
--   '.', '^', and '$'.
HaskellLines :: MatchOption

-- | Unicode word boundaries. If set, '\\b' uses the Unicode TR 29
--   definition of word boundaries.
--   
--   Warning: Unicode word boundaries are quite different from
--   traditional regular expression word boundaries. See
--   http://unicode.org/reports/tr29/#Word_Boundaries.
UnicodeWord :: MatchOption

-- | Throw an error on unrecognized backslash escapes. If set, fail with an
--   error on patterns that contain backslash-escaped ASCII letters without
--   a known special meaning. If this flag is not set, these escaped
--   letters represent themselves.
ErrorOnUnknownEscapes :: MatchOption

-- | Set a processing limit for match operations.
--   
--   Some patterns, when matching certain strings, can run in exponential
--   time. For practical purposes, the match operation may appear to be in
--   an infinite loop. When a limit is set a match operation will fail with
--   an error if the limit is exceeded.
--   
--   The units of the limit are steps of the match engine. Correspondence
--   with actual processor time will depend on the speed of the processor
--   and the details of the specific pattern, but will typically be on the
--   order of milliseconds.
--   
--   By default, the matching time is not limited.
WorkLimit :: Int -> MatchOption

-- | Set the amount of heap storage available for use by the match
--   backtracking stack.
--   
--   ICU uses a backtracking regular expression engine, with the backtrack
--   stack maintained on the heap. This function sets the limit to the
--   amount of memory that can be used for this purpose. A backtracking
--   stack overflow will result in an error from the match operation that
--   caused it.
--   
--   A limit is desirable because a malicious or poorly designed pattern
--   can use excessive memory, potentially crashing the process. A limit is
--   enabled by default.
StackLimit :: Int -> MatchOption

-- | Detailed information about parsing errors. Used by ICU parsing engines
--   that parse long rules, patterns, or programs, where the text being
--   parsed is long enough that more information than an ICUError is
--   needed to localize the error.
data ParseError

-- | A compiled regular expression.
--   
--   Regex values are usually constructed using the regex or
--   regex' functions. This type is also an instance of
--   IsString, so if you have the OverloadedStrings
--   language extension enabled, you can construct a Regex by simply
--   writing the pattern in quotes (though this does not allow you to
--   specify any Options).
data Regex

-- | Compile a regular expression with the given options. This function
--   throws a ParseError if the pattern is invalid.
--   
--   The Regex is initialized with empty text to search against.
regex :: [MatchOption] -> Text -> IO Regex

-- | Compile a regular expression with the given options. This is safest to
--   use when the pattern is constructed at run time.
regex' :: [MatchOption] -> Text -> IO (Either ParseError Regex)

-- | Make a copy of a compiled regular expression. Cloning a regular
--   expression is faster than opening a second instance from the source
--   form of the expression, and requires less memory.
--   
--   Note that the current input string and the position of any matched
--   text within it are not cloned; only the pattern itself and and the
--   match mode flags are copied.
--   
--   Cloning can be particularly useful to threaded applications that
--   perform multiple match operations in parallel. Each concurrent RE
--   operation requires its own instance of a Regex.
clone :: Regex -> IO Regex

-- | Set the subject text string upon which the regular expression will
--   look for matches. This function may be called any number of times,
--   allowing the regular expression pattern to be applied to different
--   strings.
setText :: Regex -> Text -> IO ()

-- | Get the subject text that is currently associated with this regular
--   expression object.
getUTextPtr :: Regex -> IO UTextPtr

-- | Return the source form of the pattern used to construct this regular
--   expression or match.
pattern :: Regex -> Text

-- | Find the first matching substring of the input string that matches the
--   pattern.
--   
--   If n is non-negative, the search for a match begins at the
--   specified index, and any match region is reset.
--   
--   If n is -1, the search begins at the start of the input region,
--   or at the start of the full string if no region has been specified.
--   
--   If a match is found, start, end, and group will
--   provide more information regarding the match.
find :: Regex -> TextI -> IO Bool

-- | Find the next pattern match in the input string. Begin searching the
--   input at the location following the end of he previous match, or at
--   the start of the string (or region) if there is no previous match.
--   
--   If a match is found, start, end, and group will
--   provide more information regarding the match.
findNext :: Regex -> IO Bool

-- | Return the number of capturing groups in this regular expression's
--   pattern.
groupCount :: Regex -> IO Int

-- | Returns the index in the input string of the start of the text matched
--   by the specified capture group during the previous match operation.
--   Returns Nothing if the capture group was not part of the last
--   match.
start :: Regex -> Int -> IO (Maybe TextI)

-- | Returns the index in the input string of the end of the text matched
--   by the specified capture group during the previous match operation.
--   Returns Nothing if the capture group was not part of the last
--   match.
end :: Regex -> Int -> IO (Maybe TextI)

-- | Returns the index in the input string of the start of the text matched
--   by the specified capture group during the previous match operation.
--   Returns -1 if the capture group was not part of the last
--   match.
start_ :: Regex -> Int -> IO TextI

-- | Returns the index in the input string of the end of the text matched
--   by the specified capture group during the previous match operation.
--   Returns -1 if the capture group was not part of the last
--   match.
end_ :: Regex -> Int -> IO TextI
instance GHC.Internal.Show.Show Data.Text.ICU.Regex.Internal.Regex

-- | Bindings for arabic shaping, implemented as bindings to the
--   International Components for Unicode (ICU) libraries.
module Data.Text.ICU.Shape

-- | Shape Arabic text on a character basis.
--   
--   Text-based shaping means that some character codepoints in the text
--   are replaced by others depending on the context. It transforms one
--   kind of text into another. In comparison, modern displays for Arabic
--   text select appropriate, context-dependent font glyphs for each text
--   element, which means that they transform text into a glyph vector.
--   
--   You probably want to call this with the LettersShape option in the
--   default case.
shapeArabic :: [ShapeOption] -> Text -> Text

-- | Options for the shapeArabic function.
data ShapeOption

-- | Tashkeel aggregation option: Replaces any combination of U+0651 with
--   one of U+064C, U+064D, U+064E, U+064F, U+0650 with U+FC5E, U+FC5F,
--   U+FC60, U+FC61, U+FC62 consecutively.
AggregateTaskheel :: ShapeOption

-- | Digit type option: Use Eastern (Extended) Arabic-Indic digits
--   (U+06f0...U+06f9).
DigitTypeAnExtended :: ShapeOption

-- | Replace European digits (U+0030...) by Arabic-Indic digits if the most
--   recent strongly directional character is an Arabic letter
--   (u_charDirection() result U_RIGHT_TO_LEFT_ARABIC [AL]).
DigitsAlen2AnInitAl :: ShapeOption

-- | Digit shaping option: Replace European digits (U+0030...) by
--   Arabic-Indic digits if the most recent strongly directional character
--   is an Arabic letter (u_charDirection() result U_RIGHT_TO_LEFT_ARABIC
--   [AL]).
DigitsAlen2AnInitLr :: ShapeOption

-- | Digit shaping option: Replace Arabic-Indic digits by European digits
--   (U+0030...).
DigitsAn2En :: ShapeOption

-- | Digit shaping option: Replace European digits (U+0030...) by
--   Arabic-Indic digits.
DigitsEn2An :: ShapeOption

-- | If more room is necessary, then try to consume spaces at the beginning
--   of the text.
LengthFixedSpacesAtBeginning :: ShapeOption

-- | If more room is necessary, then try to consume spaces at the end of
--   the text.
LengthFixedSpacesAtEnd :: ShapeOption

-- | If more room is necessary, then try to consume spaces next to modified
--   characters.
LengthFixedSpacesNear :: ShapeOption

-- | Letter shaping option: replace abstract letter characters by "shaped"
--   ones.
LettersShape :: ShapeOption

-- | Letter shaping option: replace "shaped" letter characters by abstract
--   ones.
LettersUnshape :: ShapeOption

-- | The only difference with LettersShape is that Tashkeel letters are
--   always "shaped" into the isolated form instead of the medial form
--   (selecting codepoints from the Arabic Presentation Forms-B block).
LettersShapeTashkeelIsolated :: ShapeOption

-- | Presentation form option: Don't replace Arabic Presentation Forms-A
--   and Arabic Presentation Forms-B characters with 0+06xx characters,
--   before shaping.
PreservePresentation :: ShapeOption

-- | Direction indicator: the source is in visual LTR order, the leftmost
--   displayed character stored first.
TextDirectionVisualLTR :: ShapeOption
instance GHC.Internal.Show.Show Data.Text.ICU.Shape.ShapeOption

-- | String spoofing (confusability) checks for Unicode, implemented as
--   bindings to the International Components for Unicode (ICU) uspoof
--   library.
--   
--   See UTR #36 and UTS #39 for detailed information about
--   the underlying algorithms and databases used by this module.
module Data.Text.ICU.Spoof

-- | Configurable spoof checker wrapping an opaque handle and optionally
--   wrapping a previously serialized instance.
data MSpoof

-- | Exception thrown with openFromSource fails to parse one of the
--   input files.
data OpenFromSourceParseError
OpenFromSourceParseError :: OpenFromSourceParseErrorFile -> ParseError -> OpenFromSourceParseError

-- | The file which could not be parsed.
[errFile] :: OpenFromSourceParseError -> OpenFromSourceParseErrorFile

-- | Parse error encountered opening a spoof checker from source.
[parseError] :: OpenFromSourceParseError -> ParseError
data SpoofCheck

-- | Makes areConfusable report if both identifiers are both from
--   the same script and are visually confusable. Does not affect
--   spoofCheck.
SingleScriptConfusable :: SpoofCheck

-- | Makes areConfusable report if both identifiers are visually
--   confusable and at least one identifier contains characters from more
--   than one script.
--   
--   Makes spoofCheck report if the identifier contains multiple
--   scripts, and is confusable with some other identifier in a single
--   script.
MixedScriptConfusable :: SpoofCheck

-- | Makes areConfusable report if each identifier is of a different
--   single script, and the identifiers are visually confusable.
WholeScriptConfusable :: SpoofCheck

-- | By default, spoof checks assume the strings have been processed
--   through toCaseFold and only check lower-case identifiers. If
--   this is set, spoof checks will check both upper and lower case
--   identifiers.
AnyCase :: SpoofCheck

-- | Checks that identifiers are no looser than the specified level passed
--   to setRestrictionLevel.
RestrictionLevel :: SpoofCheck

-- | Checks the identifier for the presence of invisible characters, such
--   as zero-width spaces, or character sequences that are likely not to
--   display, such as multiple occurrences of the same non-spacing mark.
Invisible :: SpoofCheck

-- | Checks whether the identifier contains only characters from a
--   specified set (for example, via setAllowedLocales).
CharLimit :: SpoofCheck

-- | Checks that the identifier contains numbers from only a single script.
MixedNumbers :: SpoofCheck

-- | Enables all checks.
AllChecks :: SpoofCheck

-- | Enables returning a RestrictionLevel in the
--   SpoofCheckResult.
AuxInfo :: SpoofCheck
data SpoofCheckResult

-- | The string passed all configured spoof checks.
CheckOK :: SpoofCheckResult

-- | The string failed one or more spoof checks.
CheckFailed :: [SpoofCheck] -> SpoofCheckResult

-- | The string failed one or more spoof checks, and failed to pass the
--   configured restriction level.
CheckFailedWithRestrictionLevel :: [SpoofCheck] -> RestrictionLevel -> SpoofCheckResult

-- | The spoof checks which the string failed.
[failedChecks] :: SpoofCheckResult -> [SpoofCheck]

-- | The restriction level which the string failed to pass.
[failedLevel] :: SpoofCheckResult -> RestrictionLevel
data RestrictionLevel

-- | Checks that the string contains only Unicode values in the range ߝ
--   inclusive.
ASCII :: RestrictionLevel

-- | Checks that the string contains only characters from a single script.
SingleScriptRestrictive :: RestrictionLevel

-- | Checks that the string contains only characters from a single script,
--   or from the combinations (Latin + Han + Hiragana + Katakana), (Latin +
--   Han + Bopomofo), or (Latin + Han + Hangul).
HighlyRestrictive :: RestrictionLevel

-- | Checks that the string contains only characters from the combinations
--   (Latin + Cyrillic + Greek + Cherokee), (Latin + Han + Hiragana +
--   Katakana), (Latin + Han + Bopomofo), or (Latin + Han + Hangul).
ModeratelyRestrictive :: RestrictionLevel

-- | Allows arbitrary mixtures of scripts.
MinimallyRestrictive :: RestrictionLevel

-- | Allows any valid identifiers, including characters outside of the
--   Identifier Profile.
Unrestrictive :: RestrictionLevel
data SkeletonTypeOverride

-- | By default, getSkeleton builds skeletons which catch visually
--   confusable characters across multiple scripts. Pass this flag to
--   override that behavior and build skeletons which catch visually
--   confusable characters across single scripts.
SkeletonSingleScript :: SkeletonTypeOverride

-- | By default, getSkeleton assumes the input string has already
--   been passed through toCaseFold and is lower-case. Pass this
--   flag to override that behavior and allow upper and lower-case strings.
SkeletonAnyCase :: SkeletonTypeOverride

-- | Open a spoof checker for checking Unicode strings for lookalike
--   security issues with default options (all SpoofChecks except
--   CharLimit).
open :: IO MSpoof

-- | Open a spoof checker previously serialized to bytes using
--   serialize. The returned MSpoof will retain a reference
--   to the ForeignPtr inside the ByteString, so ensure its
--   contents do not change for the lifetime of the lifetime of the
--   returned value.
openFromSerialized :: ByteString -> IO MSpoof

-- | Open a spoof checker with custom rules given the UTF-8 encoded
--   contents of the confusables.txt and
--   confusablesWholeScript.txt files as described in Unicode
--   UAX #39.
openFromSource :: (ByteString, ByteString) -> IO MSpoof

-- | Generates re-usable "skeleton" strings which can be used (via Unicode
--   equality) to check if an identifier is confusable with some large set
--   of existing identifiers.
--   
--   If you cache the returned strings in storage, you must
--   invalidate your cache any time the underlying confusables database
--   changes (i.e., on ICU upgrade).
--   
--   By default, assumes all input strings have been passed through
--   toCaseFold and are lower-case. To change this, pass
--   SkeletonAnyCase.
--   
--   By default, builds skeletons which catch visually confusable
--   characters across multiple scripts. Pass SkeletonSingleScript
--   to override that behavior and build skeletons which catch visually
--   confusable characters across single scripts.
getSkeleton :: MSpoof -> Maybe SkeletonTypeOverride -> Text -> IO Text

-- | Get the checks performed by a spoof checker.
getChecks :: MSpoof -> IO [SpoofCheck]

-- | Configure the checks performed by a spoof checker.
setChecks :: MSpoof -> [SpoofCheck] -> IO ()

-- | Get the restriction level of a spoof checker.
getRestrictionLevel :: MSpoof -> IO (Maybe RestrictionLevel)

-- | Configure the restriction level of a spoof checker.
setRestrictionLevel :: MSpoof -> RestrictionLevel -> IO ()

-- | Get the list of locale names allowed to be used with a spoof checker.
--   (We don't use LocaleName since the root and default locales
--   have no meaning here.)
getAllowedLocales :: MSpoof -> IO [String]

-- | Get the list of locale names allowed to be used with a spoof checker.
--   (We don't use LocaleName since the root and default locales
--   have no meaning here.)
setAllowedLocales :: MSpoof -> [String] -> IO ()

-- | Check if two strings could be confused with each other.
areConfusable :: MSpoof -> Text -> Text -> IO SpoofCheckResult

-- | Checks if a string could be confused with any other.
spoofCheck :: MSpoof -> Text -> IO SpoofCheckResult

-- | Serializes the rules in this spoof checker to a byte array, suitable
--   for re-use by openFromSerialized.
--   
--   Only includes any data provided to openFromSource. Does not
--   include any other state or configuration.
serialize :: MSpoof -> IO ByteString
instance GHC.Internal.Enum.Bounded Data.Text.ICU.Spoof.RestrictionLevel
instance GHC.Internal.Enum.Bounded Data.Text.ICU.Spoof.SkeletonTypeOverride
instance GHC.Internal.Enum.Bounded Data.Text.ICU.Spoof.SpoofCheck
instance GHC.Internal.Enum.Enum Data.Text.ICU.Spoof.RestrictionLevel
instance GHC.Internal.Enum.Enum Data.Text.ICU.Spoof.SkeletonTypeOverride
instance GHC.Internal.Enum.Enum Data.Text.ICU.Spoof.SpoofCheck
instance GHC.Classes.Eq Data.Text.ICU.Spoof.OpenFromSourceParseErrorFile
instance GHC.Classes.Eq Data.Text.ICU.Spoof.RestrictionLevel
instance GHC.Classes.Eq Data.Text.ICU.Spoof.SkeletonTypeOverride
instance GHC.Classes.Eq Data.Text.ICU.Spoof.SpoofCheck
instance GHC.Classes.Eq Data.Text.ICU.Spoof.SpoofCheckResult
instance GHC.Internal.Exception.Type.Exception Data.Text.ICU.Spoof.OpenFromSourceParseError
instance Control.DeepSeq.NFData Data.Text.ICU.Spoof.OpenFromSourceParseError
instance Control.DeepSeq.NFData Data.Text.ICU.Spoof.OpenFromSourceParseErrorFile
instance GHC.Internal.Show.Show Data.Text.ICU.Spoof.OpenFromSourceParseError
instance GHC.Internal.Show.Show Data.Text.ICU.Spoof.OpenFromSourceParseErrorFile
instance GHC.Internal.Show.Show Data.Text.ICU.Spoof.RestrictionLevel
instance GHC.Internal.Show.Show Data.Text.ICU.Spoof.SkeletonTypeOverride
instance GHC.Internal.Show.Show Data.Text.ICU.Spoof.SpoofCheck
instance GHC.Internal.Show.Show Data.Text.ICU.Spoof.SpoofCheckResult
instance Data.Text.ICU.BitMask.ToBitMask Data.Text.ICU.Spoof.RestrictionLevel
instance Data.Text.ICU.BitMask.ToBitMask Data.Text.ICU.Spoof.SkeletonTypeOverride
instance Data.Text.ICU.BitMask.ToBitMask Data.Text.ICU.Spoof.SpoofCheck

-- | Commonly used functions for Unicode, implemented as bindings to the
--   International Components for Unicode (ICU) libraries.
--   
--   This module contains only the most commonly used types and functions.
--   Other modules in this package expose richer interfaces.
module Data.Text.ICU

-- | The name of a locale.
data LocaleName

-- | The root locale. For a description of resource bundles and the root
--   resource, see
--   http://userguide.icu-project.org/locale/resources.
Root :: LocaleName

-- | A specific locale.
Locale :: String -> LocaleName

-- | The program's current locale.
Current :: LocaleName

-- | Get the available default locales, i.e. locales that return data when
--   passed to ICU APIs, but not including legacy or alias locales.
availableLocales :: IO [String]

-- | A boundary analyser.
data Breaker a

-- | A break in a string.
data Break a

-- | Prefix of the current break.
brkPrefix :: Break a -> Text

-- | Text of the current break.
brkBreak :: Break a -> Text

-- | Suffix of the current break.
brkSuffix :: Break a -> Text

-- | Status of the current break (only meaningful if Line or
--   Word).
brkStatus :: Break a -> a

-- | Line break status.
data Line

-- | A soft line break is a position at which a line break is acceptable,
--   but not required.
Soft :: Line
Hard :: Line

-- | Word break status.
data Word

-- | A "word" that does not fit into another category. Includes spaces and
--   most punctuation.
Uncategorized :: Word

-- | A word that appears to be a number.
Number :: Word

-- | A word containing letters, excluding hiragana, katakana or ideographic
--   characters.
Letter :: Word

-- | A word containing kana characters.
Kana :: Word

-- | A word containing ideographic characters.
Ideograph :: Word

-- | Break a string on character boundaries.
--   
--   Character boundary analysis identifies the boundaries of "Extended
--   Grapheme Clusters", which are groupings of codepoints that should be
--   treated as character-like units for many text operations. Please see
--   Unicode Standard Annex #29, Unicode Text Segmentation,
--   http://www.unicode.org/reports/tr29/ for additional information
--   on grapheme clusters and guidelines on their use.
breakCharacter :: LocaleName -> Breaker ()

-- | Break a string on line boundaries.
--   
--   Line boundary analysis determines where a text string can be broken
--   when line wrapping. The mechanism correctly handles punctuation and
--   hyphenated words.
breakLine :: LocaleName -> Breaker Line

-- | Break a string on sentence boundaries.
--   
--   Sentence boundary analysis allows selection with correct
--   interpretation of periods within numbers and abbreviations, and
--   trailing punctuation marks such as quotation marks and parentheses.
breakSentence :: LocaleName -> Breaker ()

-- | Break a string on word boundaries.
--   
--   Word boundary analysis is used by search and replace functions, as
--   well as within text editing applications that allow the user to select
--   words with a double click. Word selection provides correct
--   interpretation of punctuation marks within and following words.
--   Characters that are not part of a word, such as symbols or punctuation
--   marks, have word breaks on both sides.
breakWord :: LocaleName -> Breaker Word

-- | Return a list of all breaks in a string, from left to right.
breaks :: Breaker a -> Text -> [Break a]

-- | Return a list of all breaks in a string, from right to left.
breaksRight :: Breaker a -> Text -> [Break a]

-- | Case-fold the characters in a string.
--   
--   Case folding is locale independent and not context sensitive, but
--   there is an option for treating the letter I specially for Turkic
--   languages. The result may be longer or shorter than the original.
toCaseFold :: Bool -> Text -> Text

-- | Lowercase the characters in a string.
--   
--   Casing is locale dependent and context sensitive. The result may be
--   longer or shorter than the original.
toLower :: LocaleName -> Text -> Text

-- | Uppercase the characters in a string.
--   
--   Casing is locale dependent and context sensitive. The result may be
--   longer or shorter than the original.
toUpper :: LocaleName -> Text -> Text

-- | A type that supports efficient iteration over Unicode characters.
--   
--   As an example of where this may be useful, a function using this type
--   may be able to iterate over a UTF-8 ByteString directly, rather
--   than first copying and converting it to an intermediate form. This
--   type also allows e.g. comparison between Text and
--   ByteString, with minimal overhead.
data CharIterator

-- | Construct a CharIterator from a Unicode string.
fromString :: String -> CharIterator

-- | Construct a CharIterator from a Unicode string.
fromText :: Text -> CharIterator

-- | Construct a CharIterator from a Unicode string encoded as a
--   UTF-8 ByteString. The validity of the encoded string is *not*
--   checked.
fromUtf8 :: ByteString -> CharIterator

-- | Create an NFC normalizer and apply this to the given text.
--   
--   Let's have a look at a concrete example that contains the letter a
--   with an acute accent twice. First as a combination of two codepoints
--   and second as a canonical composite or precomposed character. Both
--   look exactly the same but one character consists of two and one of
--   only one codepoint. A bytewise comparison does not give equality of
--   these.
--   
--   
--   >>> import Data.Text
--   
--   >>> let t = pack "a\x301á"
--   
--   >>> t
--   "a\769\225"
--   
--   >>> putStr t
--   áá
--   pack "a\x301" == pack "á"
--   False
--   
--   
--   But now lets apply some normalization functions and see how these
--   characters coincide afterwards in two different ways:
--   
--   
--   >>> nfc t
--   "\225\225"
--   
--   >>> nfd t
--   "a\769a\769"
--   
--   
--   That is exactly what compareUnicode' does:
--   
--   
--   >>> pack "a\x301" `compareUnicode'` pack "á"
--   
nfc :: Text -> Text

-- | Create an NFD normalizer and apply this to the given text.
nfd :: Text -> Text

-- | Create an NFKC normalizer and apply this to the given text.
nfkc :: Text -> Text

-- | Create an NFC normalizer and apply this to the given text.
nfkd :: Text -> Text

-- | Create an NFKCCasefold normalizer and apply this to the given text.
nfkcCasefold :: Text -> Text
quickCheck :: NormalizationMode -> Text -> Maybe Bool
isNormalized :: NormalizationMode -> Text -> Bool

-- | Options to compare.
data CompareOption

-- | The caller knows that both strings fulfill the FCD
--   conditions. If not set, compare will quickCheck
--   for FCD and normalize if necessary.
InputIsFCD :: CompareOption

-- | Compare strings case-insensitively using case folding, instead of
--   case-sensitively. If set, then the following case folding options are
--   used.
CompareIgnoreCase :: CompareOption

-- | When case folding, exclude the special I character. For use with
--   Turkic (Turkish/Azerbaijani) text data.
FoldCaseExcludeSpecialI :: CompareOption

-- | Compare two strings for canonical equivalence. Further options include
--   case-insensitive comparison and codepoint order (as opposed to code
--   unit order).
--   
--   Canonical equivalence between two strings is defined as their
--   normalized forms (NFD or NFC) being identical. This
--   function compares strings incrementally instead of normalizing (and
--   optionally case-folding) both strings entirely, improving performance
--   significantly.
--   
--   Bulk normalization is only necessary if the strings do not fulfill the
--   FCD conditions. Only in this case, and only if the strings
--   are relatively long, is memory allocated temporarily. For FCD
--   strings and short non-FCD strings there is no memory
--   allocation.
compareUnicode :: [CompareOption] -> Text -> Text -> Ordering

-- | String collator type.
data Collator

-- | Create an immutable Collator for comparing strings.
--   
--   If Root is passed as the locale, UCA collation rules will be
--   used.
collator :: LocaleName -> Collator

-- | Create an immutable Collator with the given
--   Attributes.
collatorWith :: LocaleName -> [Attribute] -> Collator

-- | Create an immutable Collator from the given collation rules.
collatorFromRules :: Text -> Either ParseError Collator

-- | Create an immutable Collator from the given collation rules
--   with the given Attributes.
collatorFromRulesWith :: Text -> [Attribute] -> Either ParseError Collator

-- | Compare two strings.
collate :: Collator -> Text -> Text -> Ordering

-- | Compare two CharIterators.
--   
--   If either iterator was constructed from a ByteString, it does
--   not need to be copied or converted beforehand, so this function can be
--   quite cheap.
collateIter :: Collator -> CharIterator -> CharIterator -> Ordering

-- | Create a key for sorting the Text using the given
--   Collator. The result of comparing two ByteStrings that
--   have been transformed with sortKey will be the same as the
--   result of collate on the two untransformed Texts.
sortKey :: Collator -> Text -> ByteString

-- | A Collator that uses the Unicode Collation Algorithm (UCA).
uca :: Collator

-- | Options for controlling matching behaviour.
data MatchOption

-- | Enable case insensitive matching.
CaseInsensitive :: MatchOption

-- | Allow comments and white space within patterns.
Comments :: MatchOption

-- | If set, '.' matches line terminators. Otherwise '.'
--   matching stops at line end.
DotAll :: MatchOption

-- | If set, treat the entire pattern as a literal string. Metacharacters
--   or escape sequences in the input sequence will be given no special
--   meaning.
--   
--   The option CaseInsensitive retains its meanings on matching
--   when used in conjunction with this option. Other options become
--   superfluous.
Literal :: MatchOption

-- | Control behaviour of '$' and '^'. If set, recognize
--   line terminators within string, Otherwise, match only at start and end
--   of input string.
Multiline :: MatchOption

-- | Haskell-only line endings. When this mode is enabled, only
--   '\n' is recognized as a line ending in the behavior of
--   '.', '^', and '$'.
HaskellLines :: MatchOption

-- | Unicode word boundaries. If set, '\\b' uses the Unicode TR 29
--   definition of word boundaries.
--   
--   Warning: Unicode word boundaries are quite different from
--   traditional regular expression word boundaries. See
--   http://unicode.org/reports/tr29/#Word_Boundaries.
UnicodeWord :: MatchOption

-- | Throw an error on unrecognized backslash escapes. If set, fail with an
--   error on patterns that contain backslash-escaped ASCII letters without
--   a known special meaning. If this flag is not set, these escaped
--   letters represent themselves.
ErrorOnUnknownEscapes :: MatchOption

-- | Set a processing limit for match operations.
--   
--   Some patterns, when matching certain strings, can run in exponential
--   time. For practical purposes, the match operation may appear to be in
--   an infinite loop. When a limit is set a match operation will fail with
--   an error if the limit is exceeded.
--   
--   The units of the limit are steps of the match engine. Correspondence
--   with actual processor time will depend on the speed of the processor
--   and the details of the specific pattern, but will typically be on the
--   order of milliseconds.
--   
--   By default, the matching time is not limited.
WorkLimit :: Int -> MatchOption

-- | Set the amount of heap storage available for use by the match
--   backtracking stack.
--   
--   ICU uses a backtracking regular expression engine, with the backtrack
--   stack maintained on the heap. This function sets the limit to the
--   amount of memory that can be used for this purpose. A backtracking
--   stack overflow will result in an error from the match operation that
--   caused it.
--   
--   A limit is desirable because a malicious or poorly designed pattern
--   can use excessive memory, potentially crashing the process. A limit is
--   enabled by default.
StackLimit :: Int -> MatchOption

-- | Detailed information about parsing errors. Used by ICU parsing engines
--   that parse long rules, patterns, or programs, where the text being
--   parsed is long enough that more information than an ICUError is
--   needed to localize the error.
data ParseError

-- | A match for a regular expression.
data Match

-- | A compiled regular expression.
--   
--   Regex values are usually constructed using the regex or
--   regex' functions. This type is also an instance of
--   IsString, so if you have the OverloadedStrings
--   language extension enabled, you can construct a Regex by simply
--   writing the pattern in quotes (though this does not allow you to
--   specify any Options).
data Regex

-- | A typeclass for functions common to both Match and Regex
--   types.
class Regular r

-- | Compile a regular expression with the given options. This function
--   throws a ParseError if the pattern is invalid, so it is best
--   for use when the pattern is statically known.
regex :: [MatchOption] -> Text -> Regex

-- | Compile a regular expression with the given options. This is safest to
--   use when the pattern is constructed at run time.
regex' :: [MatchOption] -> Text -> Either ParseError Regex

-- | Return the source form of the pattern used to construct this regular
--   expression or match.
pattern :: Regular r => r -> Text

-- | Find the first match for the regular expression in the given text.
find :: Regex -> Text -> Maybe Match

-- | Lazily find all matches for the regular expression in the given text.
findAll :: Regex -> Text -> [Match]

-- | Return the number of capturing groups in this regular expression or
--   match's pattern.
groupCount :: Regular r => r -> Int

-- | A combinator for returning a list of all capturing groups on a
--   Match.
unfold :: (Int -> Match -> Maybe Text) -> Match -> [Text]

-- | Return the span of text between the end of the previous match and the
--   beginning of the current match.
span :: Match -> Text

-- | Return the nth capturing group in a match, or Nothing if
--   n is out of bounds.
group :: Int -> Match -> Maybe Text

-- | Return the prefix of the nth capturing group in a match (the
--   text from the start of the string to the start of the match), or
--   Nothing if n is out of bounds.
prefix :: Int -> Match -> Maybe Text

-- | Return the suffix of the nth capturing group in a match (the
--   text from the end of the match to the end of the string), or
--   Nothing if n is out of bounds.
suffix :: Int -> Match -> Maybe Text

-- | Spoof checker type.
data Spoof
data SpoofParams

-- | Used to configure a Spoof checker via spoofWithParams.
SpoofParams :: Maybe [SpoofCheck] -> Maybe RestrictionLevel -> Maybe [String] -> SpoofParams

-- | Optional SpoofChecks to perform on a string. By default,
--   performs all checks except CharLimit.
[spoofChecks] :: SpoofParams -> Maybe [SpoofCheck]

-- | Optional RestrictionLevel to which characters in the string
--   will be limited. By default, uses HighlyRestrictive.
[level] :: SpoofParams -> Maybe RestrictionLevel

-- | Optional locale(s) whose scripts will be used to limit the set of
--   allowed characters in a string. If set, automatically enables the
--   CharLimit spoof check.
[locales] :: SpoofParams -> Maybe [String]
data SpoofCheck

-- | Makes areConfusable report if both identifiers are both from
--   the same script and are visually confusable. Does not affect
--   spoofCheck.
SingleScriptConfusable :: SpoofCheck

-- | Makes areConfusable report if both identifiers are visually
--   confusable and at least one identifier contains characters from more
--   than one script.
--   
--   Makes spoofCheck report if the identifier contains multiple
--   scripts, and is confusable with some other identifier in a single
--   script.
MixedScriptConfusable :: SpoofCheck

-- | Makes areConfusable report if each identifier is of a different
--   single script, and the identifiers are visually confusable.
WholeScriptConfusable :: SpoofCheck

-- | By default, spoof checks assume the strings have been processed
--   through toCaseFold and only check lower-case identifiers. If
--   this is set, spoof checks will check both upper and lower case
--   identifiers.
AnyCase :: SpoofCheck

-- | Checks that identifiers are no looser than the specified level passed
--   to setRestrictionLevel.
RestrictionLevel :: SpoofCheck

-- | Checks the identifier for the presence of invisible characters, such
--   as zero-width spaces, or character sequences that are likely not to
--   display, such as multiple occurrences of the same non-spacing mark.
Invisible :: SpoofCheck

-- | Checks whether the identifier contains only characters from a
--   specified set (for example, via setAllowedLocales).
CharLimit :: SpoofCheck

-- | Checks that the identifier contains numbers from only a single script.
MixedNumbers :: SpoofCheck

-- | Enables all checks.
AllChecks :: SpoofCheck

-- | Enables returning a RestrictionLevel in the
--   SpoofCheckResult.
AuxInfo :: SpoofCheck
data RestrictionLevel

-- | Checks that the string contains only Unicode values in the range ߝ
--   inclusive.
ASCII :: RestrictionLevel

-- | Checks that the string contains only characters from a single script.
SingleScriptRestrictive :: RestrictionLevel

-- | Checks that the string contains only characters from a single script,
--   or from the combinations (Latin + Han + Hiragana + Katakana), (Latin +
--   Han + Bopomofo), or (Latin + Han + Hangul).
HighlyRestrictive :: RestrictionLevel

-- | Checks that the string contains only characters from the combinations
--   (Latin + Cyrillic + Greek + Cherokee), (Latin + Han + Hiragana +
--   Katakana), (Latin + Han + Bopomofo), or (Latin + Han + Hangul).
ModeratelyRestrictive :: RestrictionLevel

-- | Allows arbitrary mixtures of scripts.
MinimallyRestrictive :: RestrictionLevel

-- | Allows any valid identifiers, including characters outside of the
--   Identifier Profile.
Unrestrictive :: RestrictionLevel
data SpoofCheckResult

-- | The string passed all configured spoof checks.
CheckOK :: SpoofCheckResult

-- | The string failed one or more spoof checks.
CheckFailed :: [SpoofCheck] -> SpoofCheckResult

-- | The string failed one or more spoof checks, and failed to pass the
--   configured restriction level.
CheckFailedWithRestrictionLevel :: [SpoofCheck] -> RestrictionLevel -> SpoofCheckResult

-- | The spoof checks which the string failed.
[failedChecks] :: SpoofCheckResult -> [SpoofCheck]

-- | The restriction level which the string failed to pass.
[failedLevel] :: SpoofCheckResult -> RestrictionLevel

-- | Open an immutable Spoof checker with default options (all
--   SpoofChecks except CharLimit).
spoof :: Spoof

-- | Open an immutable Spoof checker with specific
--   SpoofParams to control its behavior.
spoofWithParams :: SpoofParams -> Spoof

-- | Open a immutable Spoof checker with specific SpoofParams
--   to control its behavior and custom rules given the UTF-8 encoded
--   contents of the confusables.txt and
--   confusablesWholeScript.txt files as described in Unicode
--   UAX #39.
spoofFromSource :: (ByteString, ByteString) -> SpoofParams -> Spoof

-- | Create an immutable spoof checker with specific SpoofParams to
--   control its behavior and custom rules previously returned by
--   serialize.
spoofFromSerialized :: ByteString -> SpoofParams -> Spoof

-- | Check two strings for confusability.
areConfusable :: Spoof -> Text -> Text -> SpoofCheckResult

-- | Check a string for spoofing issues.
spoofCheck :: Spoof -> Text -> SpoofCheckResult

-- | Generates re-usable "skeleton" strings which can be used (via Unicode
--   equality) to check if an identifier is confusable with some large set
--   of existing identifiers.
--   
--   If you cache the returned strings in storage, you must
--   invalidate your cache any time the underlying confusables database
--   changes (i.e., on ICU upgrade).
--   
--   By default, assumes all input strings have been passed through
--   toCaseFold and are lower-case. To change this, pass
--   SkeletonAnyCase.
--   
--   By default, builds skeletons which catch visually confusable
--   characters across multiple scripts. Pass SkeletonSingleScript
--   to override that behavior and build skeletons which catch visually
--   confusable characters across single scripts.
getSkeleton :: Spoof -> Maybe SkeletonTypeOverride -> Text -> Text

-- | Gets the checks currently configured in the spoof checker.
getChecks :: Spoof -> [SpoofCheck]

-- | Gets the locales whose scripts are currently allowed by the spoof
--   checker. (We don't use LocaleName since the root and default
--   locales have no meaning here.)
getAllowedLocales :: Spoof -> [String]

-- | Gets the restriction level currently configured in the spoof checker,
--   if present.
getRestrictionLevel :: Spoof -> Maybe RestrictionLevel

-- | Serializes the rules in this spoof checker to a byte array, suitable
--   for re-use by spoofFromSerialized.
--   
--   Only includes any data provided to openFromSource. Does not
--   include any other state or configuration.
serialize :: Spoof -> ByteString
data Calendar
data CalendarType
TraditionalCalendarType :: CalendarType
DefaultCalendarType :: CalendarType
GregorianCalendarType :: CalendarType
data SystemTimeZoneType
AnyTimeZone :: SystemTimeZoneType
CanonicalTimeZone :: SystemTimeZoneType
CanonicalLocationTimeZone :: SystemTimeZoneType

-- | All the fields that comprise a Calendar.
data CalendarField

-- | Field indicating the era, e.g., AD or BC in the Gregorian (Julian)
--   calendar. This is a calendar-specific value.
Era :: CalendarField

-- | Field indicating the year. This is a calendar-specific value.
Year :: CalendarField

-- | Field indicating the month. This is a calendar-specific value. The
--   first month of the year is JANUARY; the last depends on the number of
--   months in a year. Note: Calendar month is 0-based.
Month :: CalendarField

-- | Field indicating the week number within the current year. The first
--   week of the year, as defined by UCAL_FIRST_DAY_OF_WEEK and
--   UCAL_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. Subclasses
--   define the value of UCAL_WEEK_OF_YEAR for days before the first week
--   of the year.
WeekOfYear :: CalendarField

-- | Field indicating the week number within the current month. The first
--   week of the month, as defined by UCAL_FIRST_DAY_OF_WEEK and
--   UCAL_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. Subclasses
--   define the value of WEEK_OF_MONTH for days before the first week of
--   the month.
WeekOfMonth :: CalendarField

-- | Field indicating the day of the month. This is a synonym for
--   DAY_OF_MONTH. The first day of the month has value 1.
DayOfMonth :: CalendarField

-- | Field indicating the day number within the current year. The first day
--   of the year has value 1.
DayOfYear :: CalendarField

-- | Field indicating the day of the week. This field takes values SUNDAY,
--   MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY. Note:
--   Calendar day-of-week is 1-based. Clients who create locale resources
--   for the field of first-day-of-week should be aware of this. For
--   instance, in US locale, first-day-of-week is set to 1, i.e.,
--   UCAL_SUNDAY.
DayOfWeek :: CalendarField

-- | Field indicating the ordinal number of the day of the week within the
--   current month. Together with the DAY_OF_WEEK field, this uniquely
--   specifies a day within a month. Unlike WEEK_OF_MONTH and WEEK_OF_YEAR,
--   this field's value does not depend on getFirstDayOfWeek() or
--   getMinimalDaysInFirstWeek(). DAY_OF_MONTH 1 through 7 always
--   correspond to DAY_OF_WEEK_IN_MONTH 1; 8 through 15 correspond to
--   DAY_OF_WEEK_IN_MONTH 2, and so on. DAY_OF_WEEK_IN_MONTH 0 indicates
--   the week before DAY_OF_WEEK_IN_MONTH 1. Negative values count back
--   from the end of the month, so the last Sunday of a month is specified
--   as DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1. Because negative
--   values count backward they will usually be aligned differently within
--   the month than positive values. For example, if a month has 31 days,
--   DAY_OF_WEEK_IN_MONTH -1 will overlap DAY_OF_WEEK_IN_MONTH 5 and the
--   end of 4.
DayOfWeekInMonth :: CalendarField

-- | Field indicating whether the HOUR is before or after noon. E.g., at
--   10:04:15.250 PM the AM_PM is PM.
AmPm :: CalendarField

-- | Field indicating the hour of the morning or afternoon. HOUR is used
--   for the 12-hour clock. E.g., at 10:04:15.250 PM the HOUR is 10.
Hour :: CalendarField

-- | Field indicating the hour of the day. HOUR_OF_DAY is used for the
--   24-hour clock. E.g., at 10:04:15.250 PM the HOUR_OF_DAY is 22.
HourOfDay :: CalendarField

-- | Field indicating the minute within the hour. E.g., at 10:04:15.250 PM
--   the UCAL_MINUTE is 4.
Minute :: CalendarField

-- | Field indicating the second within the minute. E.g., at 10:04:15.250
--   PM the UCAL_SECOND is 15.
Second :: CalendarField

-- | Field indicating the millisecond within the second. E.g., at
--   10:04:15.250 PM the UCAL_MILLISECOND is 250.
Millisecond :: CalendarField

-- | Field indicating the raw offset from GMT in milliseconds.
ZoneOffset :: CalendarField

-- | Field indicating the daylight savings offset in milliseconds.
DstOffset :: CalendarField

-- | Field indicating the extended year corresponding to the
--   UCAL_WEEK_OF_YEAR field. This may be one greater or less than the
--   value of UCAL_EXTENDED_YEAR.
YearWoY :: CalendarField

-- | Field indicating the localized day of week. This will be a value from
--   1 to 7 inclusive, with 1 being the localized first day of the week.
DoWLocal :: CalendarField

-- | Year of this calendar system, encompassing all supra-year fields. For
--   example, in Gregorian/Julian calendars, positive Extended Year values
--   indicate years AD, 1 BC = 0 extended, 2 BC = -1 extended, and so on.
ExtendedYear :: CalendarField

-- | Field indicating the modified Julian day number. This is different
--   from the conventional Julian day number in two regards. First, it
--   demarcates days at local zone midnight, rather than noon GMT. Second,
--   it is a local number; that is, it depends on the local time zone. It
--   can be thought of as a single number that encompasses all the
--   date-related fields.
JulianDay :: CalendarField

-- | Ranges from 0 to 23:59:59.999 (regardless of DST). This field behaves
--   exactly like a composite of all time-related fields, not including the
--   zone fields. As such, it also reflects discontinuities of those fields
--   on DST transition days. On a day of DST onset, it will jump forward.
--   On a day of DST cessation, it will jump backward. This reflects the
--   fact that it must be combined with the DST_OFFSET field to obtain a
--   unique local time value.
MillisecondsInDay :: CalendarField

-- | Whether or not the current month is a leap month (0 or 1). See the
--   Chinese calendar for an example of this.
IsLeapMonth :: CalendarField

-- | Open a Calendar.
--   
--   A Calendar may be used to convert a millisecond value to a year,
--   month, and day.
--   
--   Note: When unknown TimeZone ID is specified or if the TimeZone ID
--   specified is "Etc/Unknown", the Calendar returned by the function is
--   initialized with GMT zone with TimeZone ID UCAL_UNKNOWN_ZONE_ID
--   ("EtcUnknown") without any errorswarnings. If you want to check
--   if a TimeZone ID is valid prior to this function, use
--   ucal_getCanonicalTimeZoneID.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> show c
--   2021-10-12 17:37:43
--   
calendar :: Text -> LocaleName -> CalendarType -> IO Calendar

-- | Add a specified signed amount to a particular field in a Calendar.
--   
--   See rollField for further details.
--   
--   
--   >>> import qualified Data.Text as T
--   
--   >>> c1 <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> show c1
--   2021-10-12 17:53:26
--   
--   >>> let c2 = roll c1 [(Hour, 2)]
--   
--   >>> show c2
--   2021-10-12 19:53:26
--   
--   >>> let c3 = roll c1 [(Hour, 12)]
--   
--   >>> show c3
--   2021-10-12 17:53:26
--   
--   >>> let c4 = add c1 [(Hour, 12)]
--   
--   >>> show c4
--   2021-10-13 5:53:26
--   
roll :: Calendar -> [(CalendarField, Int)] -> Calendar

-- | Add a specified signed amount to a particular field in a Calendar.
--   
--   See addField for further details and see rollField for
--   examples and differences compared to rolling.
add :: Calendar -> [(CalendarField, Int)] -> Calendar

-- | Set the value of one field of a calendar to a certain value. All
--   fields are represented as 32-bit integers.
set1 :: Calendar -> CalendarField -> Int -> Calendar

-- | Set the value of a list of fields of a calendar to certain values. All
--   fields are represented as 32-bit integers.
set :: Calendar -> [(CalendarField, Int)] -> Calendar

-- | Get the value of a specific field in the calendar.
get :: Calendar -> CalendarField -> Int
data NumberFormatter

-- | Create a new NumberFormatter.
--   
--   See
--   https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
--   for how to specify the number skeletons. And use
--   availableLocales in order to find the allowed locale names.
--   These usuallly look like "en", "de", "de_AT" etc. See
--   formatIntegral and formatDouble for some examples.
numberFormatter :: Text -> LocaleName -> IO NumberFormatter

-- | Format an integral number.
--   
--   See
--   https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
--   for how to specify the number skeletons.
--   
--   
--   >>> import Data.Text
--   
--   >>> nf <- numberFormatter (pack "precision-integer") (Locale "de")
--   
--   >>> formatIntegral nf 12345
--   "12.345"
--   
--   >>> nf2 <- numberFormatter (pack "precision-integer") (Locale "fr")
--   
--   >>> formatIntegral nf2 12345
--   "12\8239\&345"
--   
formatIntegral :: Integral a => NumberFormatter -> a -> Text

-- | Create a number formatter and apply it to an integral number.
formatIntegral' :: Integral a => Text -> LocaleName -> a -> Text

-- | Format a Double.
--   
--   See
--   https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
--   for how to specify the number skeletons.
--   
--   
--   >>> import Data.Text
--   
--   >>> nf3 <- numberFormatter (pack "precision-currency-cash") (Locale "it")
--   
--   >>> formatDouble nf3 12345.6789
--   "12.345,68"
--   
formatDouble :: NumberFormatter -> Double -> Text

-- | Create a number formatter and apply it to a Double.
formatDouble' :: Text -> LocaleName -> Double -> Text

-- | This is an abstract data type holding a reference to the ICU date
--   format object. Create a DateFormatter with either
--   standardDateFormatter or patternDateFormatter and use it
--   in order to format Calendar objects with the function
--   formatCalendar.
data DateFormatter

-- | The possible date/time format styles.
data FormatStyle

-- | Full style, such as Tuesday, April 12, 1952 AD or 3:30:42pm PST
FullFormatStyle :: FormatStyle

-- | Long style, such as January 12, 1952 or 3:30:32pm
LongFormatStyle :: FormatStyle

-- | Medium style, such as Jan. 12, 1952
MediumFormatStyle :: FormatStyle

-- | Short style, such as 121352 or 3:30pm
ShortFormatStyle :: FormatStyle

-- | Default style
DefaultFormatStyle :: FormatStyle

-- | Relative style: ICU currently provides limited support for formatting
--   dates using a “relative” style, specified using RELATIVE_SHORT,
--   RELATIVE_MEDIUM, RELATIVE_LONG or RELATIVE_FULL. As currently
--   implemented, relative date formatting only affects the formatting of
--   dates within a limited range of calendar days before or after the
--   current date, based on the CLDR type="day"/relative
--   data: For example, in English, “Yesterday”, “Today”, and “Tomorrow”.
--   Within this range, the specific relative style currently makes no
--   difference. Outside of this range, relative dates are formatted using
--   the corresponding non-relative style (SHORT, MEDIUM, etc.). Relative
--   time styles are not currently supported, and behave just like the
--   corresponding non-relative style.
RelativeFormatStyle :: FormatStyle

-- | No style.
NoFormatStyle :: FormatStyle

-- | The possible types of date format symbols.
data DateFormatSymbolType

-- | The era names, for example AD.
Eras :: DateFormatSymbolType

-- | The month names, for example February.
Months :: DateFormatSymbolType

-- | The short month names, for example Feb.
ShortMonths :: DateFormatSymbolType

-- | The CLDR-style format "wide" weekday names, for example Monday.
Weekdays :: DateFormatSymbolType

-- | The CLDR-style format "abbreviated" (not "short") weekday names, for
--   example "Mon." For the CLDR-style format "short" weekday names, use
--   UDAT_SHORTER_WEEKDAYS.
ShortWeekdays :: DateFormatSymbolType

-- | The AM/PM names, for example AM.
AmPms :: DateFormatSymbolType

-- | The localized characters.
LocalizedChars :: DateFormatSymbolType

-- | The long era names, for example Anno Domini.
EraNames :: DateFormatSymbolType

-- | The narrow month names, for example F.
NarrowMonths :: DateFormatSymbolType

-- | The CLDR-style format "narrow" weekday names, for example M.
NarrowWeekdays :: DateFormatSymbolType

-- | Standalone context versions of months.
StandaloneMonths :: DateFormatSymbolType

-- | The CLDR-style stand-alone "wide" weekday names.
StandaloneWeekdays :: DateFormatSymbolType

-- | The CLDR-style stand-alone "abbreviated" (not "short") weekday names.
--   For the CLDR-style stand-alone "short" weekday names, use
--   UDAT_STANDALONE_SHORTER_WEEKDAYS.
StandaoneShortWeekdays :: DateFormatSymbolType

-- | The CLDR-style stand-alone "narrow" weekday names.
StandaloneNarrowWeekdays :: DateFormatSymbolType

-- | The quarters, for example 1st Quarter.
Quarters :: DateFormatSymbolType

-- | The short quarter names, for example Q1.
ShortQuarters :: DateFormatSymbolType

-- | Standalone context versions of quarters.
StandaloneQuarters :: DateFormatSymbolType

-- | The CLDR-style short weekday names, e.g. Su, Mo", etc. These
--   are named SHORTER to contrast with the constants using SHORT
--   above, which actually get the CLDR-style abbreviated versions of the
--   corresponding names.
ShorterWeekdays :: DateFormatSymbolType

-- | Standalone version of UDAT_SHORTER_WEEKDAYS.
StandaloneShorterWeekdays :: DateFormatSymbolType

-- | Cyclic year names (only supported for some calendars, and only for
--   FORMAT usage; udat_setSymbols not supported for
--   UDAT_CYCLIC_YEARS_WIDE)
CyclicYearsWide :: DateFormatSymbolType

-- | Cyclic year names (only supported for some calendars, and only for
--   FORMAT usage)
CyclicYearsAbbreviated :: DateFormatSymbolType

-- | Cyclic year names (only supported for some calendars, and only for
--   FORMAT usage; udat_setSymbols not supported for
--   UDAT_CYCLIC_YEARS_NARROW)
CyclicYearsNarrow :: DateFormatSymbolType

-- | Calendar zodiac names (only supported for some calendars, and only for
--   FORMAT usage; udat_setSymbols not supported for
--   UDAT_ZODIAC_NAMES_WIDE)
ZodiacNamesWide :: DateFormatSymbolType

-- | Calendar zodiac names (only supported for some calendars, and only for
--   FORMAT usage)
ZodiacNamesAbbreviated :: DateFormatSymbolType

-- | Calendar zodiac names (only supported for some calendars, and only for
--   FORMAT usage; udat_setSymbols not supported for
--   UDAT_ZODIAC_NAMES_NARROW)
ZodiacNamesNarrow :: DateFormatSymbolType

-- | The narrow quarter names, for example 1.
NarrowQuarters :: DateFormatSymbolType

-- | The narrow standalone quarter names, for example 1.
StandaloneNarrowQuarters :: DateFormatSymbolType

-- | Create a new DateFormatter from the standard styles.
--   
--   
--   >>> import Data.Text
--   
--   >>> dfDe <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_DE") (pack "CET")
--   
standardDateFormatter :: FormatStyle -> FormatStyle -> LocaleName -> Text -> IO DateFormatter

-- | Create a new DateFormatter using a custom pattern as described
--   at
--   https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax.
--   For examples the pattern "yyyy.MM.dd G at HH:mm:ss zzz"
--   produces “1996.07.10 AD at 15:08:56 PDT” in English for the PDT time
--   zone.
--   
--   A date pattern is a string of characters, where specific strings of
--   characters are replaced with date and time data from a calendar when
--   formatting or used to generate data for a calendar when parsing.
--   
--   The Date Field Symbol Table contains the characters used in
--   patterns to show the appropriate formats for a given locale, such as
--   yyyy for the year. Characters may be used multiple times. For example,
--   if y is used for the year, "yy" might produce “99”, whereas "yyyy"
--   produces “1999”. For most numerical fields, the number of characters
--   specifies the field width. For example, if h is the hour, "h" might
--   produce “5”, but "hh" produces “05”. For some characters, the count
--   specifies whether an abbreviated or full form should be used, but may
--   have other choices, as given below.
--   
--   Two single quotes represents a literal single quote, either inside or
--   outside single quotes. Text within single quotes is not interpreted in
--   any way (except for two adjacent single quotes). Otherwise all ASCII
--   letter from a to z and A to Z are reserved as syntax characters, and
--   require quoting if they are to represent literal characters. In
--   addition, certain ASCII punctuation characters may become variable in
--   the future (eg : being interpreted as the time separator and
--   / as a date separator, and replaced by respective
--   locale-sensitive characters in display).
--   
--   “Stand-alone” values refer to those designed to stand on their own
--   independently, as opposed to being with other formatted values. “2nd
--   quarter” would use the wide stand-alone format "qqqq", whereas “2nd
--   quarter 2007” would use the regular format "QQQQ yyyy". For more
--   information about format and stand-alone forms, see CLDR Calendar
--   Elements.
--   
--   The pattern characters used in the Date Field Symbol Table are defined
--   by CLDR; for more information see CLDR Date Field Symbol Table.
--   
--   👉 Note that the examples may not reflect current CLDR data.
patternDateFormatter :: Text -> LocaleName -> Text -> IO DateFormatter

-- | Get relevant date related symbols, e.g. month and weekday names.
--   
--   
--   >>> import Data.Text
--   
--   >>> dfDe <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_DE") (pack "CET")
--   
--   >>> dateSymbols dfDe Months
--   ["Januar","Februar","M\228rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]
--   
--   >>> dfAt <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_AT") (pack "CET")
--   
--   >>> dateSymbols dfAt Months
--   ["J\228nner","Februar","M\228rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]
--   
dateSymbols :: DateFormatter -> DateFormatSymbolType -> [Text]

-- | Format a Calendar using a DateFormatter.
--   
--   
--   >>> import Data.Text
--   
--   >>> dfDe <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_DE") (pack "CET")
--   
--   >>> c <- calendar (pack "CET") (Locale "de_DE") TraditionalCalendarType
--   
--   >>> formatCalendar dfDe c
--   "13. Oktober 2021 um 12:44:09 GMT+2"
--   
formatCalendar :: DateFormatter -> Calendar -> Text

-- | Types for use when manipulating Unicode text, using the bindings to
--   the International Components for Unicode (ICU) libraries.
module Data.Text.ICU.Types

-- | The name of a locale.
data LocaleName

-- | The root locale. For a description of resource bundles and the root
--   resource, see
--   http://userguide.icu-project.org/locale/resources.
Root :: LocaleName

-- | A specific locale.
Locale :: String -> LocaleName

-- | The program's current locale.
Current :: LocaleName

-- | Detailed information about parsing errors. Used by ICU parsing engines
--   that parse long rules, patterns, or programs, where the text being
--   parsed is long enough that more information than an ICUError is
--   needed to localize the error.
data ParseError
