on master help sign in
Start lazy encoding code

--HG-- extra : convert_revision : 82b24c9c4626988ca28d6bf63edd99f9b48e1b1d

commit41959432d4ceba48c8328706cd5bfe578356bf96 authorBryan O'Sullivan <bos@serpentine.com> dateSun 8 Mar 2009, 06:49 (18 years ago) parent75c1438
3 files changed+70−1
Data/Text/Lazy/Encoding.hs+37 Data/Text/Lazy/Encoding/Fusion.hs+30 text.cabal+3−1
Data/Text/Lazy/Encoding.hsnew file+37
@@ -0,0 +1,37 @@
1+-- |
2+-- Module : Data.Text.Lazy.Encoding
3+-- Copyright : (c) Tom Harper 2008-2009,
4+-- (c) Bryan O'Sullivan 2009,
5+-- (c) Duncan Coutts 2009
6+--
7+-- License : BSD-style
8+-- Maintainer : rtharper@aftereternity.co.uk, bos@serpentine.com,
9+-- duncan@haskell.org
10+-- Stability : experimental
11+-- Portability : portable
12+--
13+-- Functions for converting lazy 'Text' values to and from lazy
14+-- 'ByteString', using several standard encodings.
15+--
16+-- To make use of a much larger variety of encodings, use the @text-icu@
17+-- package.
18+
19+module Data.Text.Lazy.Encoding
20+ (
21+ -- * Decoding ByteStrings to Text
22+ -- decodeASCII
23+ --, decodeUtf8
24+ --, decodeUtf16LE
25+ --, decodeUtf16BE
26+ --, decodeUtf32LE
27+ --, decodeUtf32BE
28+
29+ -- * Encoding Text to ByteStrings
30+ --, encodeUtf8
31+ --, encodeUtf16LE
32+ --, encodeUtf16BE
33+ --, encodeUtf32LE
34+ --, encodeUtf32BE
35+ ) where
36+
37+import Data.ByteString.Lazy (ByteString)
Data/Text/Lazy/Encoding/Fusion.hsnew file+30
@@ -0,0 +1,30 @@
1+-- |
2+-- Module : Data.Text.Lazy.Encoding.Fusion
3+-- Copyright : (c) Bryan O'Sullivan 2009
4+--
5+-- License : BSD-style
6+-- Maintainer : rtharper@aftereternity.co.uk, bos@serpentine.com,
7+-- duncan@haskell.org
8+-- Stability : experimental
9+-- Portability : portable
10+--
11+-- Fusible 'Stream'-oriented functions for converting between lazy
12+-- 'Text' and several common encodings.
13+
14+module Data.Text.Lazy.Encoding.Fusion
15+ (
16+ -- * Streaming
17+ -- streamASCII
18+ --, streamUtf8
19+ --, streamUtf16LE
20+ --, streamUtf16BE
21+ --, streamUtf32LE
22+ --, streamUtf32BE
23+
24+ -- * Unstreaming
25+ --, unstream
26+
27+ module Data.Text.Encoding.Fusion.Common
28+ ) where
29+
30+import Data.Text.Encoding.Fusion.Common
text.cabal+3−1
@@ -19,15 +19,17 @@ library
1919 Data.Text
2020 Data.Text.Encoding
2121 Data.Text.Encoding.Fusion
22− Data.Text.Encoding.Fusion.Common
2322 Data.Text.Foreign
2423 Data.Text.Fusion
2524 Data.Text.Fusion.Common
2625 Data.Text.Lazy
26+ Data.Text.Lazy.Encoding
27+ Data.Text.Lazy.Encoding.Fusion
2728 Data.Text.Lazy.Fusion
2829 other-modules:
2930 Data.Text.Array
3031 Data.Text.Internal
32+ Data.Text.Encoding.Fusion.Common
3133 Data.Text.Fusion.Internal
3234 Data.Text.Lazy.Internal
3335 Data.Text.Unsafe