Skip to content

Commit 07cde4c

Browse files
Update haddock documentation
Conflicts: Data/Text/NormalizeNative.hs Data/Unicode/Normalize.hs
1 parent 751a5fc commit 07cde4c

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

Data/ByteString/UTF8/Normalize.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
-- Stability : experimental
88
-- Portability : GHC
99
--
10+
-- Unicode normalization for @ByteString@ data type.
11+
--
1012
module Data.ByteString.UTF8.Normalize
1113
(
12-
module Data.Unicode.Types
13-
-- * Normalization
14+
-- * Normalization Modes
15+
NormalizationMode(..)
16+
-- * Normalization API
1417
, normalize
1518
) where
1619

Data/Text/Normalize.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
-- Stability : experimental
88
-- Portability : GHC
99
--
10+
-- Unicode normalization for @Text@ data type.
11+
--
1012
module Data.Text.Normalize
1113
(
12-
module Data.Unicode.Types
13-
-- * Normalization
14+
-- * Normalization Modes
15+
NormalizationMode(..)
16+
-- * Normalization API
1417
, normalize
1518
) where
1619

@@ -21,7 +24,7 @@ import Data.Unicode.UTF8Proc
2124
import Foreign.Ptr (castPtr)
2225
import System.IO.Unsafe (unsafePerformIO)
2326

24-
-- | Perform Unicode normalization on a @Text@ according to the specified
27+
-- | Perform Unicode normalization on @Text@ according to the specified
2528
-- normalization mode.
2629
normalize :: NormalizationMode -> Text -> Text
2730
normalize mode txt =

Data/Unicode/Types.hs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,16 @@
1616

1717
module Data.Unicode.Types
1818
(
19-
-- * Unicode normalization API
20-
-- $api
2119
NormalizationMode(..)
2220
) where
2321

2422
import 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+
--
9793
data NormalizationMode
9894
= NFD -- ^ Canonical decomposition.
9995
| NFKD -- ^ Compatibility decomposition.

0 commit comments

Comments
 (0)