| Copyright | (c) 2024 Pierre Le Marre |
|---|---|
| Maintainer | dev@wismill.eu |
| Stability | experimental |
| Safe Haskell | None |
| Language | GHC2021 |
UCD.Parser.UnicodeData
Description
Parser for UnicodeData.txt.
Since: 0.1.0
Synopsis
- data GeneralCategory
- data DecompositionType
- data Decomposition
- = Self
- | Decomposition !DecompositionType ![Char]
- data Entry = Entry {
- _range :: !(UnicodeRange ShortByteString)
- _details :: !CharDetails
- data NumericValue
- = NotNumeric
- | Digit !Word8
- | Integer !Integer
- | Rational !Rational
- data CharDetails = CharDetails {
- _generalCategory :: !GeneralCategory
- _combiningClass :: !Int
- _decomposition :: !Decomposition
- _numericValue :: !NumericValue
- _simpleUpperCaseMapping :: !(Maybe Char)
- _simpleLowerCaseMapping :: !(Maybe Char)
- _simpleTitleCaseMapping :: !(Maybe Char)
- parse :: ByteString -> [Entry]
Documentation
data GeneralCategory Source #
See: https://www.unicode.org/reports/tr44/#General_Category
Since: 0.1.0
Constructors
| Lu | Letter, Uppercase |
| Ll | Letter, Lowercase |
| Lt | Letter, Titlecase |
| Lm | Letter, Modifier |
| Lo | Letter, Other |
| Mn | Mark, Non-Spacing |
| Mc | Mark, Spacing Combining |
| Me | Mark, Enclosing |
| Nd | Number, Decimal |
| Nl | Number, Letter |
| No | Number, Other |
| Pc | Punctuation, Connector |
| Pd | Punctuation, Dash |
| Ps | Punctuation, Open |
| Pe | Punctuation, Close |
| Pi | Punctuation, Initial quote |
| Pf | Punctuation, Final quote |
| Po | Punctuation, Other |
| Sm | Symbol, Math |
| Sc | Symbol, Currency |
| Sk | Symbol, Modifier |
| So | Symbol, Other |
| Zs | Separator, Space |
| Zl | Separator, Line |
| Zp | Separator, Paragraph |
| Cc | Other, Control |
| Cf | Other, Format |
| Cs | Other, Surrogate |
| Co | Other, Private Use |
| Cn | Other, Not Assigned |
Instances
data DecompositionType Source #
Constructors
| DTCanonical | |
| DTCompat | |
| DTFont | |
| DTNoBreak | |
| DTInitial | |
| DTMedial | |
| DTFinal | |
| DTIsolated | |
| DTCircle | |
| DTSuper | |
| DTSub | |
| DTVertical | |
| DTWide | |
| DTNarrow | |
| DTSmall | |
| DTSquare | |
| DTFraction |
Instances
| Show DecompositionType Source # | |
Defined in UCD.Parser.UnicodeData Methods showsPrec :: Int -> DecompositionType -> ShowS show :: DecompositionType -> String showList :: [DecompositionType] -> ShowS | |
| Eq DecompositionType Source # | |
Defined in UCD.Parser.UnicodeData Methods (==) :: DecompositionType -> DecompositionType -> Bool (/=) :: DecompositionType -> DecompositionType -> Bool | |
data Decomposition Source #
Unicode decomposition of a code point
Since: 0.1.0
Constructors
| Self | |
| Decomposition !DecompositionType ![Char] |
Instances
| Show Decomposition Source # | |
Defined in UCD.Parser.UnicodeData Methods showsPrec :: Int -> Decomposition -> ShowS show :: Decomposition -> String showList :: [Decomposition] -> ShowS | |
| Eq Decomposition Source # | |
Defined in UCD.Parser.UnicodeData | |
An entry in UnicodeData.txt.
Since: 0.1.0
Constructors
| Entry | |
Fields
| |
data NumericValue Source #
Numeric value of a code point, if relevant
Since: 0.1.0
Constructors
| NotNumeric | |
| Digit !Word8 | |
| Integer !Integer | |
| Rational !Rational |
Instances
| Show NumericValue Source # | |
Defined in UCD.Parser.UnicodeData Methods showsPrec :: Int -> NumericValue -> ShowS show :: NumericValue -> String showList :: [NumericValue] -> ShowS | |
| Eq NumericValue Source # | |
Defined in UCD.Parser.UnicodeData | |
data CharDetails Source #
Core characteristics of a Unicode code point
Since: 0.1.0
Constructors
| CharDetails | |
Fields
| |
Instances
| Show CharDetails Source # | |
Defined in UCD.Parser.UnicodeData Methods showsPrec :: Int -> CharDetails -> ShowS show :: CharDetails -> String showList :: [CharDetails] -> ShowS | |
| Eq CharDetails Source # | |
Defined in UCD.Parser.UnicodeData | |
parse :: ByteString -> [Entry] Source #
Parser for UnicodeData.txt file
Since: 0.1.0