aboutsummaryrefslogtreecommitdiffhomepage
path: root/Pipes
diff options
context:
space:
mode:
authormichaelt <what_is_it_to_do_anything@yahoo.com>2014-06-04 13:03:50 -0400
committermichaelt <what_is_it_to_do_anything@yahoo.com>2014-06-04 13:03:50 -0400
commiteae50557854d33624618a4ca7bcb68a88ec8f288 (patch)
tree63da6659640106c5ee800606a93b6bf0722a71a4 /Pipes
parent10cfd90ed71019539410b21defad6093117ca316 (diff)
downloadtext-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.hs15
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
52import Data.Text (Text) 52import Data.Text (Text)
53import qualified Data.Text as T 53import qualified Data.Text as T
54import qualified Data.Text.Encoding as TE 54import qualified Data.Text.Encoding as TE
55import Data.Text.StreamDecoding 55import qualified Data.Streaming.Text as Stream
56import Data.Streaming.Text (DecodeResult(..))
56import Control.Monad (join) 57import Control.Monad (join)
57import Data.Word (Word8) 58import Data.Word (Word8)
58import Pipes 59import Pipes
@@ -202,27 +203,27 @@ decodeStream = loop where
202 203
203 204
204decodeUtf8 :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) 205decodeUtf8 :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r)
205decodeUtf8 = decodeStream streamUtf8 206decodeUtf8 = decodeStream Stream.decodeUtf8
206{-# INLINE decodeUtf8 #-} 207{-# INLINE decodeUtf8 #-}
207 208
208decodeUtf8Pure :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) 209decodeUtf8Pure :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r)
209decodeUtf8Pure = decodeStream streamUtf8Pure 210decodeUtf8Pure = decodeStream Stream.decodeUtf8Pure
210{-# INLINE decodeUtf8Pure #-} 211{-# INLINE decodeUtf8Pure #-}
211 212
212decodeUtf16LE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) 213decodeUtf16LE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r)
213decodeUtf16LE = decodeStream streamUtf16LE 214decodeUtf16LE = decodeStream Stream.decodeUtf16LE
214{-# INLINE decodeUtf16LE #-} 215{-# INLINE decodeUtf16LE #-}
215 216
216decodeUtf16BE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) 217decodeUtf16BE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r)
217decodeUtf16BE = decodeStream streamUtf16BE 218decodeUtf16BE = decodeStream Stream.decodeUtf16BE
218{-# INLINE decodeUtf16BE #-} 219{-# INLINE decodeUtf16BE #-}
219 220
220decodeUtf32LE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) 221decodeUtf32LE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r)
221decodeUtf32LE = decodeStream streamUtf32LE 222decodeUtf32LE = decodeStream Stream.decodeUtf32LE
222{-# INLINE decodeUtf32LE #-} 223{-# INLINE decodeUtf32LE #-}
223 224
224decodeUtf32BE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r) 225decodeUtf32BE :: Monad m => Producer ByteString m r -> Producer Text m (Producer ByteString m r)
225decodeUtf32BE = decodeStream streamUtf32BE 226decodeUtf32BE = decodeStream Stream.decodeUtf32BE
226{-# INLINE decodeUtf32BE #-} 227{-# INLINE decodeUtf32BE #-}
227 228
228 229