@@ -31,7 +31,6 @@ module Data.Text.Encoding.Fusion
3131 -- * Restreaming
3232 -- Restreaming is the act of converting from one 'Stream'
3333 -- representation to another.
34− , restreamASCII
3534 , restreamUtf8
3635 , restreamUtf16LE
3736 , restreamUtf16BE
@@ -52,9 +51,9 @@ import Foreign.Storable (pokeByteOff)
5251import System.IO.Unsafe (unsafePerformIO)
5352import qualified Data.ByteString as B
5453import qualified Data.ByteString.Unsafe as B
55−import qualified Data.Text.Utf16 as U16
56−import qualified Data.Text.Utf32 as U32
57−import qualified Data.Text.Utf8 as U8
54+import qualified Data.Text.Encoding.Utf8 as U8
55+import qualified Data.Text.Encoding.Utf16 as U16
56+import qualified Data.Text.Encoding.Utf32 as U32
5857
5958-- Specialised, strict Maybe-like type.
6059data M = N
@@ -175,16 +174,6 @@ streamUtf32LE bs = Stream next 0 l
175174 idx = fromIntegral . B.unsafeIndex bs :: Int -> Word32
176175{-# INLINE [0] streamUtf32LE #-}
177176
178−restreamASCII :: Stream Char -> Stream Word8
179−restreamASCII (Stream next0 s0 len) = Stream next s0 (len*2)
180− where
181− next !s = case next0 s of
182− Done -> Done
183− Skip s' -> Skip s'
184− Yield x xs -> Yield x' xs
185− where x' = fromIntegral (ord x) :: Word8
186−{-# INLINE restreamASCII #-}
187−
188177-- | /O(n)/ Convert a Stream Char into a UTF-8 encoded Stream Word8.
189178restreamUtf8 :: Stream Char -> Stream Word8
190179restreamUtf8 (Stream next0 s0 len) =