on master help sign in
Fix Haddocks
960d36aBryan O'Sullivan
Data/Text/Encoding.hs+4−1
@@ -11,7 +11,10 @@
11-- Portability : portable
11-- Portability : portable
12--
12--
13-- Functions for converting 'Text' values to and from 'ByteString',
13-- Functions for converting 'Text' values to and from 'ByteString',
14−-- using several common encodings.
14+-- using several standard encodings.
15+--
16+-- To make use of a much larger variety of encodings, use the @text-icu@
17+-- package.
15
18
16module Data.Text.Encoding
19module Data.Text.Encoding
17 (
20 (
Data/Text/Encoding/Fusion.hs+5−5
@@ -76,7 +76,7 @@ streamASCII bs = Stream next 0 l
76 x1 = B.unsafeIndex bs i
76 x1 = B.unsafeIndex bs i
77{-# INLINE [0] streamASCII #-}
77{-# INLINE [0] streamASCII #-}
78
78
79−-- | /O(n) Convert a 'ByteString' into a 'Stream Char', using UTF-8
79+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using UTF-8
80-- encoding.
80-- encoding.
81streamUtf8 :: ByteString -> Stream Char
81streamUtf8 :: ByteString -> Stream Char
82streamUtf8 bs = Stream next 0 l
82streamUtf8 bs = Stream next 0 l
@@ -98,7 +98,7 @@ streamUtf8 bs = Stream next 0 l
98 idx = B.unsafeIndex bs
98 idx = B.unsafeIndex bs
99{-# INLINE [0] streamUtf8 #-}
99{-# INLINE [0] streamUtf8 #-}
100
100
101−-- | /O(n) Convert a 'ByteString' into a 'Stream Char', using little
101+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using little
102-- endian UTF-16 encoding.
102-- endian UTF-16 encoding.
103streamUtf16LE :: ByteString -> Stream Char
103streamUtf16LE :: ByteString -> Stream Char
104streamUtf16LE bs = Stream next 0 l
104streamUtf16LE bs = Stream next 0 l
@@ -116,7 +116,7 @@ streamUtf16LE bs = Stream next 0 l
116 idx = fromIntegral . B.unsafeIndex bs :: Int -> Word16
116 idx = fromIntegral . B.unsafeIndex bs :: Int -> Word16
117{-# INLINE [0] streamUtf16LE #-}
117{-# INLINE [0] streamUtf16LE #-}
118
118
119−-- | /O(n) Convert a 'ByteString' into a 'Stream Char', using big
119+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using big
120-- endian UTF-16 encoding.
120-- endian UTF-16 encoding.
121streamUtf16BE :: ByteString -> Stream Char
121streamUtf16BE :: ByteString -> Stream Char
122streamUtf16BE bs = Stream next 0 l
122streamUtf16BE bs = Stream next 0 l
@@ -134,7 +134,7 @@ streamUtf16BE bs = Stream next 0 l
134 idx = fromIntegral . B.unsafeIndex bs :: Int -> Word16
134 idx = fromIntegral . B.unsafeIndex bs :: Int -> Word16
135{-# INLINE [0] streamUtf16BE #-}
135{-# INLINE [0] streamUtf16BE #-}
136
136
137−-- | /O(n) Convert a 'ByteString' into a 'Stream Char', using big
137+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using big
138-- endian UTF-32 encoding.
138-- endian UTF-32 encoding.
139streamUtf32BE :: ByteString -> Stream Char
139streamUtf32BE :: ByteString -> Stream Char
140streamUtf32BE bs = Stream next 0 l
140streamUtf32BE bs = Stream next 0 l
@@ -154,7 +154,7 @@ streamUtf32BE bs = Stream next 0 l
154 idx = fromIntegral . B.unsafeIndex bs :: Int -> Word32
154 idx = fromIntegral . B.unsafeIndex bs :: Int -> Word32
155{-# INLINE [0] streamUtf32BE #-}
155{-# INLINE [0] streamUtf32BE #-}
156
156
157−-- | /O(n) Convert a 'ByteString' into a 'Stream Char', using little
157+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using little
158-- endian UTF-32 encoding.
158-- endian UTF-32 encoding.
159streamUtf32LE :: ByteString -> Stream Char
159streamUtf32LE :: ByteString -> Stream Char
160streamUtf32LE bs = Stream next 0 l
160streamUtf32LE bs = Stream next 0 l