@@ -1,5 +1,5 @@
2−-- Module : Streamly.Internal.Data.Array.Mut.Stream
2+-- Module : Streamly.Internal.Data.Stream.MutChunked
3-- Copyright : (c) 2019 Composewell Technologies
3-- Copyright : (c) 2019 Composewell Technologies
4-- License : BSD3-3-Clause
4-- License : BSD3-3-Clause
5-- Maintainer : streamly@composewell.com
5-- Maintainer : streamly@composewell.com
@@ -8,7 +8,7 @@
9-- Combinators to efficiently manipulate streams of mutable arrays.
9-- Combinators to efficiently manipulate streams of mutable arrays.
11−module Streamly.Internal.Data.Array.Mut.Stream
11+module Streamly.Internal.Data.Stream.MutChunked
13 -- * Generation
13 -- * Generation
@@ -32,13 +32,13 @@ import Control.Monad (when)
32import Data.Bifunctor (first)
32import Data.Bifunctor (first)
33import Data.Proxy (Proxy(..))
33import Data.Proxy (Proxy(..))
34import Streamly.Internal.Data.Unbox (Unbox, sizeOf)
34import Streamly.Internal.Data.Unbox (Unbox, sizeOf)
35−import Streamly.Internal.Data.Array.Mut.Type (MutArray(..))
35+import Streamly.Internal.Data.MutArray.Type (MutArray(..))
36import Streamly.Internal.Data.Fold.Type (Fold(..))
36import Streamly.Internal.Data.Fold.Type (Fold(..))
37import Streamly.Internal.Data.Parser (ParseError)
37import Streamly.Internal.Data.Parser (ParseError)
38import Streamly.Internal.Data.Stream.StreamD.Type (Stream)
38import Streamly.Internal.Data.Stream.StreamD.Type (Stream)
39import Streamly.Internal.Data.Tuple.Strict (Tuple'(..))
39import Streamly.Internal.Data.Tuple.Strict (Tuple'(..))
41−import qualified Streamly.Internal.Data.Array.Mut.Type as MArray
41+import qualified Streamly.Internal.Data.MutArray.Type as MArray
42import qualified Streamly.Internal.Data.Fold.Type as FL
42import qualified Streamly.Internal.Data.Fold.Type as FL
43import qualified Streamly.Internal.Data.Parser as ParserD
43import qualified Streamly.Internal.Data.Parser as ParserD
44import qualified Streamly.Internal.Data.Stream as D
44import qualified Streamly.Internal.Data.Stream as D
@@ -92,7 +92,7 @@ packArraysChunksOf n (D.Stream step state) =
92 step' gst (SpliceInitial st) = do
92 step' gst (SpliceInitial st) = do
93 when (n <= 0) $
93 when (n <= 0) $
94 -- XXX we can pass the module string from the higher level API
94 -- XXX we can pass the module string from the higher level API
95− error $ "Streamly.Internal.Data.Array.Mut.Type.packArraysChunksOf: the size of "
95+ error $ "Streamly.Internal.Data.MutArray.Type.packArraysChunksOf: the size of "
96 ++ "arrays [" ++ show n ++ "] must be a natural number"
96 ++ "arrays [" ++ show n ++ "] must be a natural number"
97 r <- step gst st
97 r <- step gst st
@@ -139,7 +139,7 @@ lpackArraysChunksOf n (Fold step1 initial1 extract1) =
139 initial = do
139 initial = do
140 when (n <= 0) $
140 when (n <= 0) $
141 -- XXX we can pass the module string from the higher level API
141 -- XXX we can pass the module string from the higher level API
142− error $ "Streamly.Internal.Data.Array.Mut.Type.packArraysChunksOf: the size of "
142+ error $ "Streamly.Internal.Data.MutArray.Type.packArraysChunksOf: the size of "
143 ++ "arrays [" ++ show n ++ "] must be a natural number"
143 ++ "arrays [" ++ show n ++ "] must be a natural number"
145 r <- initial1
145 r <- initial1
@@ -243,7 +243,7 @@ compactLEParserD n = ParserD.Parser step initial extract
243 extract (Just buf) = return $ ParserD.Done 0 buf
243 extract (Just buf) = return $ ParserD.Done 0 buf
245 functionPath =
245 functionPath =
246− "Streamly.Internal.Data.Array.Mut.Stream.compactLEParserD"
246+ "Streamly.Internal.Data.Stream.MutChunked.compactLEParserD"
248-- | Coalesce adjacent arrays in incoming stream to form bigger arrays of a
248-- | Coalesce adjacent arrays in incoming stream to form bigger arrays of a
249-- minimum specified size. Note that if all the arrays in the stream together
249-- minimum specified size. Note that if all the arrays in the stream together
@@ -292,7 +292,7 @@ compactGEFold n = Fold step initial extract
292 extract (Just buf) = return buf
292 extract (Just buf) = return buf
294 functionPath =
294 functionPath =
295− "Streamly.Internal.Data.Array.Mut.Stream.compactGEFold"
295+ "Streamly.Internal.Data.Stream.MutChunked.compactGEFold"
297-- | Coalesce adjacent arrays in incoming stream to form bigger arrays of a
297-- | Coalesce adjacent arrays in incoming stream to form bigger arrays of a
298-- maximum specified size in bytes.
298-- maximum specified size in bytes.