1616
1717module Data.Unicode.Types
1818 (
19- -- * Unicode normalization API
20- -- $api
2119 NormalizationMode (.. )
2220 ) where
2321
2422import Data.Typeable (Typeable )
2523
26- -- $api
27- --
28- -- The 'normalize' function transforms Unicode text into an equivalent
24+ -- |
25+ -- Normalization transforms Unicode text into an equivalent
2926-- composed or decomposed form, allowing for easier sorting and
30- -- searching of text. 'normalize' supports the standard normalization
31- -- forms described in <http://www.unicode.org/unicode/reports/tr15/>,
27+ -- searching of text. Standard normalization forms are described in
28+ -- <http://www.unicode.org/unicode/reports/tr15/>,
3229-- Unicode Standard Annex #15: Unicode Normalization Forms.
3330--
3431-- Characters with accents or other adornments can be encoded in
@@ -78,11 +75,11 @@ import Data.Typeable (Typeable)
7875-- corresponding semantic characters. When sorting and searching, you
7976-- will often want to use these mappings.
8077--
81- -- 'normalize' helps solve these problems by transforming text into
78+ -- Normalization helps solve these problems by transforming text into
8279-- the canonical composed and decomposed forms as shown in the first
8380-- example above. In addition, you can have it perform compatibility
8481-- decompositions so that you can treat compatibility characters the
85- -- same as their equivalents. Finally, 'normalize' rearranges accents
82+ -- same as their equivalents. Finally, normalization rearranges accents
8683-- into the proper canonical order, so that you do not have to worry
8784-- about accent rearrangement on your own.
8885--
@@ -92,8 +89,7 @@ import Data.Typeable (Typeable)
9289-- conversion to such character encodings the Unicode text needs to be
9390-- normalized to 'NFC'. For more usage examples, see the Unicode
9491-- Standard Annex.
95-
96- -- | Normalization modes.
92+ --
9793data NormalizationMode
9894 = NFD -- ^ Canonical decomposition.
9995 | NFKD -- ^ Compatibility decomposition.
0 commit comments