diff options
-rw-r--r-- | Pipes/Text/Encoding.hs | 15 | ||||
-rw-r--r-- | pipes-text.cabal | 25 |
2 files changed, 21 insertions, 19 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 | ||
diff --git a/pipes-text.cabal b/pipes-text.cabal index f4e554d..4f1602c 100644 --- a/pipes-text.cabal +++ b/pipes-text.cabal | |||
@@ -1,5 +1,5 @@ | |||
1 | name: pipes-text | 1 | name: pipes-text |
2 | version: 0.0.0.10 | 2 | version: 0.0.0.11 |
3 | synopsis: Text pipes. | 3 | synopsis: Text pipes. |
4 | description: * This package will be in a draft, or testing, phase until version 0.0.1. Please report any installation difficulties, or any wisdom about the api, on the github page or the <https://groups.google.com/forum/#!forum/haskell-pipes pipes list> | 4 | description: * This package will be in a draft, or testing, phase until version 0.0.1. Please report any installation difficulties, or any wisdom about the api, on the github page or the <https://groups.google.com/forum/#!forum/haskell-pipes pipes list> |
5 | . | 5 | . |
@@ -34,17 +34,18 @@ flag noio | |||
34 | 34 | ||
35 | library | 35 | library |
36 | exposed-modules: Pipes.Text, Pipes.Text.Encoding | 36 | exposed-modules: Pipes.Text, Pipes.Text.Encoding |
37 | build-depends: base >= 4 && < 5 , | 37 | build-depends: base >= 4 && < 5 , |
38 | bytestring >= 0.9 , | 38 | bytestring >= 0.9.2.1 && < 0.11, |
39 | text >=0.11.2 && < 1.2, | 39 | text >= 0.11.2 && < 1.2 , |
40 | text-stream-decode >= 0.1 && < 0.2, | 40 | streaming-commons >= 0.1 && < 0.2 , |
41 | profunctors >= 3.1.1 && < 4.1, | 41 | profunctors >= 3.1.1 && < 4.1 , |
42 | pipes >=4.0 && < 4.2, | 42 | pipes >= 4.0 && < 4.2 , |
43 | pipes-group >= 1.0.0 && < 1.1, | 43 | pipes-group >= 1.0.0 && < 1.1 , |
44 | pipes-parse >=2.0 && < 3.1, | 44 | pipes-parse >= 3.0.0 && < 3.1 , |
45 | pipes-safe, | 45 | pipes-safe >= 2.1 && < 2.3 , |
46 | pipes-bytestring >= 1.0 && < 2.1, | 46 | pipes-bytestring >= 1.0 && < 2.1 , |
47 | transformers >= 0.2.0.0 && < 0.4 | 47 | transformers >= 0.2.0.0 && < 0.5 |
48 | |||
48 | other-extensions: RankNTypes | 49 | other-extensions: RankNTypes |
49 | default-language: Haskell2010 | 50 | default-language: Haskell2010 |
50 | ghc-options: -O2 | 51 | ghc-options: -O2 |