@@ -19,7 +19,7 @@
19#include "inline.hs"
19#include "inline.hs"
22−-- Module : Streamly.Streams.StreamD
22+-- Module : Streamly.Internal.Data.Stream.StreamD
23-- Copyright : (c) 2018 Harendra Kumar
23-- Copyright : (c) 2018 Harendra Kumar
24-- Copyright : (c) Roman Leshchinskiy 2008-2010
24-- Copyright : (c) Roman Leshchinskiy 2008-2010
25-- Copyright : (c) The University of Glasgow, 2009
25-- Copyright : (c) The University of Glasgow, 2009
@@ -36,13 +36,13 @@
36-- CPS implementation.
36-- CPS implementation.
39−-- import qualified Streamly.Streams.StreamD as D
39+-- import qualified Streamly.Internal.Data.Stream.StreamD as D
42-- Some of the functions in this file have been adapted from the vector
42-- Some of the functions in this file have been adapted from the vector
43-- library, https://hackage.haskell.org/package/vector.
43-- library, https://hackage.haskell.org/package/vector.
45−module Streamly.Streams.StreamD
45+module Streamly.Internal.Data.Stream.StreamD
47 -- * The stream type
47 -- * The stream type
@@ -3826,7 +3826,7 @@ decodeUtf8With cfm (Stream step state) =
3826 inputUnderflow =
3826 inputUnderflow =
3827 case cfm of
3827 case cfm of
3828 ErrorOnCodingFailure ->
3828 ErrorOnCodingFailure ->
3829− error "Streamly.Streams.StreamD.decodeUtf8With: Input Underflow"
3829+ error "Streamly.Internal.Data.Stream.StreamD.decodeUtf8With: Input Underflow"
3830 TransliterateCodingFailure -> YieldAndContinue replacementChar Done
3830 TransliterateCodingFailure -> YieldAndContinue replacementChar Done
3831 {-# INLINE_LATE step' #-}
3831 {-# INLINE_LATE step' #-}
3832 step' _ gst (FreshPointDecodeInit st) = do
3832 step' _ gst (FreshPointDecodeInit st) = do
@@ -3860,7 +3860,7 @@ decodeUtf8With cfm (Stream step state) =
3862 transliterateOrError
3862 transliterateOrError
3863− "Streamly.Streams.StreamD.decodeUtf8With: Invalid UTF8 codepoint encountered"
3863+ "Streamly.Internal.Data.Stream.StreamD.decodeUtf8With: Invalid UTF8 codepoint encountered"
3864 (FreshPointDecodeInit st)
3864 (FreshPointDecodeInit st)
3865 0 -> error "unreachable state"
3865 0 -> error "unreachable state"
3866 _ -> Skip (FreshPointDecoding st sv cp)
3866 _ -> Skip (FreshPointDecoding st sv cp)
@@ -3879,7 +3879,7 @@ decodeUtf8With cfm (Stream step state) =
3881 transliterateOrError
3881 transliterateOrError
3882− "Streamly.Streams.StreamD.decodeUtf8With: Invalid UTF8 codepoint encountered"
3882+ "Streamly.Internal.Data.Stream.StreamD.decodeUtf8With: Invalid UTF8 codepoint encountered"
3883 (FreshPointDecodeInit1 s x)
3883 (FreshPointDecodeInit1 s x)
3884 _ -> Skip (FreshPointDecoding s sv cp)
3884 _ -> Skip (FreshPointDecoding s sv cp)
3885 Skip s -> return $ Skip (FreshPointDecoding s statePtr codepointPtr)
3885 Skip s -> return $ Skip (FreshPointDecoding s statePtr codepointPtr)
@@ -4012,7 +4012,7 @@ decodeUtf8ArraysWith cfm (Stream step state) =
4012 case cfm of
4012 case cfm of
4013 ErrorOnCodingFailure ->
4013 ErrorOnCodingFailure ->
4015− "Streamly.Streams.StreamD.decodeUtf8ArraysWith: Input Underflow"
4015+ "Streamly.Internal.Data.Stream.StreamD.decodeUtf8ArraysWith: Input Underflow"
4016 TransliterateCodingFailure -> YAndC replacementChar D
4016 TransliterateCodingFailure -> YAndC replacementChar D
4017 {-# INLINE_LATE step' #-}
4017 {-# INLINE_LATE step' #-}
4018 step' _ gst (OuterLoop st Nothing) = do
4018 step' _ gst (OuterLoop st Nothing) = do
@@ -4061,7 +4061,7 @@ decodeUtf8ArraysWith cfm (Stream step state) =
4063 transliterateOrError
4063 transliterateOrError
4064− "Streamly.Streams.StreamD.decodeUtf8ArraysWith: Invalid UTF8 codepoint encountered"
4064+ "Streamly.Internal.Data.Stream.StreamD.decodeUtf8ArraysWith: Invalid UTF8 codepoint encountered"
4065 (InnerLoopDecodeInit st startf (p `plusPtr` 1) end)
4065 (InnerLoopDecodeInit st startf (p `plusPtr` 1) end)
4066 0 -> error "unreachable state"
4066 0 -> error "unreachable state"
4067 _ -> Skip (InnerLoopDecoding st startf (p `plusPtr` 1) end sv cp)
4067 _ -> Skip (InnerLoopDecoding st startf (p `plusPtr` 1) end sv cp)
@@ -4082,7 +4082,7 @@ decodeUtf8ArraysWith cfm (Stream step state) =
4084 transliterateOrError
4084 transliterateOrError
4085− "Streamly.Streams.StreamD.decodeUtf8ArraysWith: Invalid UTF8 codepoint encountered"
4085+ "Streamly.Internal.Data.Stream.StreamD.decodeUtf8ArraysWith: Invalid UTF8 codepoint encountered"
4086 (InnerLoopDecodeInit st startf (p `plusPtr` 1) end)
4086 (InnerLoopDecodeInit st startf (p `plusPtr` 1) end)
4087 _ -> Skip (InnerLoopDecoding st startf (p `plusPtr` 1) end sv cp)
4087 _ -> Skip (InnerLoopDecoding st startf (p `plusPtr` 1) end sv cp)
4088 step' _ _ (YAndC c s) = return $ Yield c s
4088 step' _ _ (YAndC c s) = return $ Yield c s
@@ -4128,7 +4128,7 @@ encodeUtf8 (Stream step state) = Stream step' (EncodeState state WNil)
4128 | x <= 0xFFFF ->
4128 | x <= 0xFFFF ->
4129 if isSurrogate c
4129 if isSurrogate c
4130 then error
4130 then error
4131− "Streamly.Streams.StreamD.encodeUtf8: Encountered a surrogate"
4131+ "Streamly.Internal.Data.Stream.StreamD.encodeUtf8: Encountered a surrogate"
4132 else Skip (EncodeState s (ord3 c))
4132 else Skip (EncodeState s (ord3 c))
4133 | otherwise -> Skip (EncodeState s (ord4 c))
4133 | otherwise -> Skip (EncodeState s (ord4 c))
4134 Skip s -> Skip (EncodeState s WNil)
4134 Skip s -> Skip (EncodeState s WNil)