diff options
author | michaelt <what_is_it_to_do_anything@yahoo.com> | 2014-06-04 13:03:50 -0400 |
---|---|---|
committer | michaelt <what_is_it_to_do_anything@yahoo.com> | 2014-06-04 13:03:50 -0400 |
commit | eae50557854d33624618a4ca7bcb68a88ec8f288 (patch) | |
tree | 63da6659640106c5ee800606a93b6bf0722a71a4 /Pipes | |
parent | 10cfd90ed71019539410b21defad6093117ca316 (diff) | |
download | text-pipes-eae50557854d33624618a4ca7bcb68a88ec8f288.tar.gz text-pipes-eae50557854d33624618a4ca7bcb68a88ec8f288.tar.zst text-pipes-eae50557854d33624618a4ca7bcb68a88ec8f288.zip |
depend on streaming commons
Diffstat (limited to 'Pipes')
-rw-r--r-- | Pipes/Text/Encoding.hs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Pipes/Text/Encoding.hs b/Pipes/Text/Encoding.hs index 37a4aa3..e00cd43 100644 --- a/Pipes/Text/Encoding.hs +++ b/Pipes/Text/Encoding.hs | |||
@@ -52,7 +52,8 @@ import Data.ByteString.Char8 as B8 | |||
52 | import Data.Text (Text) | 52 | import Data.Text (Text) |
53 | import qualified Data.Text as T | 53 | import qualified Data.Text as T |
54 | import qualified Data.Text.Encoding as TE | 54 | import qualified Data.Text.Encoding as TE |
55 | import Data.Text.StreamDecoding | 55 | import qualified Data.Streaming.Text as Stream |
56 | import Data.Streaming.Text (DecodeResult(..)) | ||
56 | import Control.Monad (join) | 57 | import Control.Monad (join) |
57 | import Data.Word (Word8) | 58 | import Data.Word (Word8) |
58 | import Pipes | 59 | import Pipes |
@@ -202,27 +203,27 @@ decodeStream = loop where | |||
202 | 203 | ||
203 | 204 | ||
204 | decodeUtf8 :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) | 205 | decodeUtf8 :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) |
205 | decodeUtf8 = decodeStream streamUtf8 | 206 | decodeUtf8 = decodeStream Stream.decodeUtf8 |
206 | {-# INLINE decodeUtf8 #-} | 207 | {-# INLINE decodeUtf8 #-} |
207 | 208 | ||
208 | decodeUtf8Pure :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) | 209 | decodeUtf8Pure :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) |
209 | decodeUtf8Pure = decodeStream streamUtf8Pure | 210 | decodeUtf8Pure = decodeStream Stream.decodeUtf8Pure |
210 | {-# INLINE decodeUtf8Pure #-} | 211 | {-# INLINE decodeUtf8Pure #-} |
211 | 212 | ||
212 | decodeUtf16LE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) | 213 | decodeUtf16LE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) |
213 | decodeUtf16LE = decodeStream streamUtf16LE | 214 | decodeUtf16LE = decodeStream Stream.decodeUtf16LE |
214 | {-# INLINE decodeUtf16LE #-} | 215 | {-# INLINE decodeUtf16LE #-} |
215 | 216 | ||
216 | decodeUtf16BE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) | 217 | decodeUtf16BE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) |
217 | decodeUtf16BE = decodeStream streamUtf16BE | 218 | decodeUtf16BE = decodeStream Stream.decodeUtf16BE |
218 | {-# INLINE decodeUtf16BE #-} | 219 | {-# INLINE decodeUtf16BE #-} |
219 | 220 | ||
220 | decodeUtf32LE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) | 221 | decodeUtf32LE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) |
221 | decodeUtf32LE = decodeStream streamUtf32LE | 222 | decodeUtf32LE = decodeStream Stream.decodeUtf32LE |
222 | {-# INLINE decodeUtf32LE #-} | 223 | {-# INLINE decodeUtf32LE #-} |
223 | 224 | ||
224 | decodeUtf32BE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) | 225 | decodeUtf32BE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) |
225 | decodeUtf32BE = decodeStream streamUtf32BE | 226 | decodeUtf32BE = decodeStream Stream.decodeUtf32BE |
226 | {-# INLINE decodeUtf32BE #-} | 227 | {-# INLINE decodeUtf32BE #-} |
227 | 228 | ||
228 | 229 | ||