Correct Internal Array module names (#2478)

This commit is contained in:
Ranjeet Ranjan 2023-07-29 00:00:34 +05:30 committed by GitHub
parent b085507aec
commit 3fb676b98b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 82 additions and 84 deletions

View File

@ -19,7 +19,7 @@ jobs:
env:
CI_BENCHMARKS_WITH_CUTOFF: >-
Data.Array
Data.Array.Mut
Data.MutArray
Data.Array.Generic
Data.Ring.Unboxed
Data.Fold

View File

@ -28,7 +28,7 @@ import System.Random (randomRIO)
import Streamly.Internal.Data.Stream (Stream)
import Streamly.Internal.Data.Fold (Fold(..))
import Streamly.Internal.Data.IsMap.HashMap ()
import Streamly.Internal.Data.Array.Mut (MutArray)
import Streamly.Internal.Data.MutArray (MutArray)
import qualified Streamly.Internal.Data.Fold as FL
import qualified Streamly.Data.Fold.Prelude as Fold

View File

@ -42,10 +42,10 @@ import Prelude
, id
, undefined
)
import Streamly.Internal.Data.Array.Mut (MutArray)
import Streamly.Internal.Data.MutArray (MutArray)
import qualified Streamly.Internal.Data.Array as Array
import qualified Streamly.Internal.Data.Array.Mut as MArray
import qualified Streamly.Internal.Data.MutArray as MArray
import qualified Streamly.Internal.Data.Fold as Fold
import qualified Streamly.Internal.Data.Stream as Stream
@ -274,7 +274,7 @@ o_1_space_serial_marray value ~(array, indices) =
-------------------------------------------------------------------------------
moduleName :: String
moduleName = "Data.Array.Mut"
moduleName = "Data.MutArray"
main :: IO ()
main = do

View File

@ -43,7 +43,7 @@ import Streamly.Benchmark.Common.Handle
#ifdef INSPECTION
import Streamly.Internal.Data.Stream.StreamD.Type (Step(..))
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.MutArray.Type as MA
import qualified Streamly.Internal.Data.Unfold as IUF
import Test.Inspection

View File

@ -48,7 +48,7 @@ import Streamly.Benchmark.Common.Handle
#ifdef INSPECTION
import Streamly.Internal.Data.Stream.StreamD.Type (Step(..), FoldMany)
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.MutArray.Type as MA
import qualified Streamly.Internal.Data.Stream as D
import qualified Streamly.Internal.Data.Unfold as IUF

View File

@ -42,7 +42,7 @@ import Streamly.Internal.Data.Stream.StreamD.Type (Step(..))
import qualified Streamly.Internal.Data.Stream.StreamD.Type as D
import qualified Streamly.Internal.Data.Tuple.Strict as Strict
import qualified Streamly.Internal.Data.Array.Mut.Stream as MAS
import qualified Streamly.Internal.Data.Stream.MutChunked as MAS
import qualified Streamly.Internal.Data.Array.Type as AT
import Test.Inspection

View File

@ -651,10 +651,10 @@ benchmark Data.Array
if flag(limit-build-mem)
ghc-options: +RTS -M1500M -RTS
benchmark Data.Array.Mut
benchmark Data.MutArray
import: bench-options
type: exitcode-stdio-1.0
main-is: Streamly/Benchmark/Data/Array/Mut.hs
main-is: Streamly/Benchmark/Data/MutArray.hs
if flag(limit-build-mem)
ghc-options: +RTS -M1500M -RTS
if flag(use-streamly-core)

View File

@ -6,5 +6,5 @@
For APIs that have not been released yet.
>>> import Streamly.Internal.Data.Array.Mut as MutArray
>>> import Streamly.Internal.Data.MutArray as MutArray
-}

View File

@ -6,5 +6,5 @@
For APIs that have not been released yet.
>>> import Streamly.Internal.Data.Array.Generic.Mut.Type as MutArray
>>> import Streamly.Internal.Data.MutArray.Generic as MutArray
-}

View File

@ -12,7 +12,7 @@
-- contents of a mutable array can be modified in-place. For general
-- documentation, please refer to the original module.
--
-- Please refer to "Streamly.Internal.Data.Array.Mut" for functions that have
-- Please refer to "Streamly.Internal.Data.MutArray" for functions that have
-- not yet been released.
--
-- For mutable arrays that work on boxed types, not requiring the 'Unbox'
@ -92,7 +92,7 @@ module Streamly.Data.MutArray
where
import Prelude hiding (length, read)
import Streamly.Internal.Data.Array.Mut
import Streamly.Internal.Data.MutArray
import Streamly.Internal.Data.Unbox (Unbox (..))
import Control.Monad.IO.Class (MonadIO)

View File

@ -59,7 +59,7 @@ module Streamly.Data.MutArray.Generic
)
where
import Streamly.Internal.Data.Array.Generic.Mut.Type
import Streamly.Internal.Data.MutArray.Generic
import Prelude hiding (read, length)
#include "DocTestDataMutArrayGeneric.hs"

View File

@ -117,7 +117,7 @@ import Foreign.Storable (Storable)
import Streamly.Internal.Data.Unbox (Unbox(..))
import Prelude hiding (length, null, last, map, (!!), read, concat)
import Streamly.Internal.Data.Array.Mut.Type (ArrayUnsafe(..))
import Streamly.Internal.Data.MutArray.Type (ArrayUnsafe(..))
import Streamly.Internal.Data.Array.Type
(Array(..), length, asPtrUnsafe)
import Streamly.Internal.Data.Fold.Type (Fold(..))
@ -127,8 +127,8 @@ import Streamly.Internal.Data.Tuple.Strict (Tuple3Fused'(..))
import Streamly.Internal.Data.Unfold.Type (Unfold(..))
import Streamly.Internal.System.IO (unsafeInlineIO)
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.Array.Mut as MA
import qualified Streamly.Internal.Data.MutArray.Type as MA
import qualified Streamly.Internal.Data.MutArray as MA
import qualified Streamly.Internal.Data.Array.Type as A
import qualified Streamly.Internal.Data.Fold as FL
import qualified Streamly.Internal.Data.Producer.Type as Producer

View File

@ -61,7 +61,7 @@ import Streamly.Internal.Data.Stream.StreamD.Type (Stream)
import Streamly.Internal.Data.Unfold.Type (Unfold(..))
import Streamly.Internal.System.IO (unsafeInlineIO)
import qualified Streamly.Internal.Data.Array.Generic.Mut.Type as MArray
import qualified Streamly.Internal.Data.MutArray.Generic as MArray
import qualified Streamly.Internal.Data.Fold.Type as FL
import qualified Streamly.Internal.Data.Producer.Type as Producer
import qualified Streamly.Internal.Data.Producer as Producer

View File

@ -8,7 +8,7 @@
-- Stability : experimental
-- Portability : GHC
--
-- See notes in "Streamly.Internal.Data.Array.Mut.Type"
-- See notes in "Streamly.Internal.Data.MutArray.Type"
--
module Streamly.Internal.Data.Array.Type
(
@ -100,7 +100,7 @@ import GHC.Exts (IsList, IsString(..), Addr#)
import GHC.IO (unsafePerformIO)
import GHC.Ptr (Ptr(..))
import Streamly.Internal.Data.Array.Mut.Type (MutArray(..), MutableByteArray)
import Streamly.Internal.Data.MutArray.Type (MutArray(..), MutableByteArray)
import Streamly.Internal.Data.Fold.Type (Fold(..))
import Streamly.Internal.Data.Stream.StreamD.Type (Stream)
import Streamly.Internal.Data.Unbox (Unbox(..))
@ -110,7 +110,7 @@ import Text.Read (readPrec)
import Prelude hiding (Foldable(..), read, unlines, splitAt)
import qualified GHC.Exts as Exts
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.MutArray.Type as MA
import qualified Streamly.Internal.Data.Stream.StreamD.Type as D
import qualified Streamly.Internal.Data.Stream.StreamD.Generate as D
import qualified Streamly.Internal.Data.Stream.StreamK.Type as K

View File

@ -323,7 +323,7 @@ import Data.Int (Int64)
import Data.Proxy (Proxy(..))
import Data.Word (Word32)
import Foreign.Storable (Storable, peek)
import Streamly.Internal.Data.Array.Mut.Type (MutArray(..))
import Streamly.Internal.Data.MutArray.Type (MutArray(..))
import Streamly.Internal.Data.Maybe.Strict (Maybe'(..), toMaybe)
import Streamly.Internal.Data.Pipe.Type (Pipe (..), PipeState(..))
import Streamly.Internal.Data.Unbox (Unbox, sizeOf)
@ -332,7 +332,7 @@ import Streamly.Internal.Data.Tuple.Strict (Tuple'(..), Tuple3'(..))
import Streamly.Internal.Data.Stream.StreamD.Type (Stream)
import qualified Prelude
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.MutArray.Type as MA
import qualified Streamly.Internal.Data.Array.Type as Array
import qualified Streamly.Internal.Data.Fold.Window as FoldW
import qualified Streamly.Internal.Data.Pipe.Type as Pipe

View File

@ -65,7 +65,7 @@ import Data.Bifunctor (first)
import Data.Proxy (Proxy(..))
import Streamly.Internal.Data.Unbox (Unbox(..))
import GHC.Types (SPEC(..))
import Streamly.Internal.Data.Array.Mut.Type (touch)
import Streamly.Internal.Data.MutArray.Type (touch)
import Streamly.Internal.Data.Array.Type (Array(..))
import Streamly.Internal.Data.Parser (Initial(..), Step(..))
import Streamly.Internal.Data.Tuple.Strict (Tuple'(..))

View File

@ -1,14 +1,14 @@
-- |
-- Module : Streamly.Internal.Data.Array.Mut
-- Module : Streamly.Internal.Data.MutArray
-- Copyright : (c) 2020 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
--
module Streamly.Internal.Data.Array.Mut
module Streamly.Internal.Data.MutArray
(
module Streamly.Internal.Data.Array.Mut.Type
module Streamly.Internal.Data.MutArray.Type
, splitOn
, genSlicesFromLen
, getSlicesFromLen
@ -27,7 +27,7 @@ import qualified Streamly.Internal.Data.Stream as D
import qualified Streamly.Internal.Data.Unfold as Unfold
import Prelude hiding (foldr, length, read, splitAt)
import Streamly.Internal.Data.Array.Mut.Type
import Streamly.Internal.Data.MutArray.Type
-- | Split the array into a stream of slices using a predicate. The element
-- matching the predicate is dropped.

View File

@ -1,14 +1,14 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE UnboxedTuples #-}
-- |
-- Module : Streamly.Internal.Data.Array.Generic.Mut.Type
-- Module : Streamly.Internal.Data.MutArray.Generic
-- Copyright : (c) 2020 Composewell Technologies
-- License : BSD3-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
--
module Streamly.Internal.Data.Array.Generic.Mut.Type
module Streamly.Internal.Data.MutArray.Generic
(
-- * Type
-- $arrayNotes
@ -229,7 +229,7 @@ bottomElement =
where
funcName = "Streamly.Internal.Data.Array.Generic.Mut.Type.bottomElement:"
funcName = "Streamly.Internal.Data.MutArray.Generic.bottomElement:"
-- XXX Would be nice if GHC can provide something like newUninitializedArray# so
-- that we do not have to write undefined or error in the whole array.

View File

@ -1,7 +1,7 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE UnboxedTuples #-}
-- |
-- Module : Streamly.Internal.Data.Array.Mut.Type
-- Module : Streamly.Internal.Data.MutArray.Type
-- Copyright : (c) 2020 Composewell Technologies
-- License : BSD3-3-Clause
-- Maintainer : streamly@composewell.com
@ -26,7 +26,7 @@
-- strive to keep the API consistent for both. Ideally, you should be able to
-- replace one with another with little changes to the code.
module Streamly.Internal.Data.Array.Mut.Type
module Streamly.Internal.Data.MutArray.Type
(
-- * Type
-- $arrayNotes

View File

@ -29,7 +29,7 @@ import Control.Monad.IO.Class (liftIO, MonadIO)
import Streamly.Internal.Data.Stream.StreamD.Type (Stream)
import Streamly.Internal.Data.Tuple.Strict (Tuple'(..))
import Streamly.Internal.Data.Fold.Type (Fold(..))
import Streamly.Internal.Data.Array.Generic.Mut.Type
import Streamly.Internal.Data.MutArray.Generic
( MutArray(..)
, new
, uninit

View File

@ -82,14 +82,14 @@ import Foreign.Ptr (plusPtr, minusPtr, castPtr)
import Streamly.Internal.Data.Unbox as Unboxed (Unbox(peekByteIndex))
import GHC.ForeignPtr (mallocPlainForeignPtrAlignedBytes)
import GHC.Ptr (Ptr(..))
import Streamly.Internal.Data.Array.Mut.Type (MutArray)
import Streamly.Internal.Data.MutArray.Type (MutArray)
import Streamly.Internal.Data.Fold.Type (Fold(..), Step(..), lmap)
import Streamly.Internal.Data.Stream.StreamD.Type (Stream)
import Streamly.Internal.Data.Stream.StreamD.Step (Step(..))
import Streamly.Internal.Data.Unfold.Type (Unfold(..))
import Streamly.Internal.System.IO (unsafeInlineIO)
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.MutArray.Type as MA
import qualified Streamly.Internal.Data.Array.Type as A
import Prelude hiding (length, concat, read)

View File

@ -88,8 +88,8 @@ import qualified Streamly.Data.Fold as FL
import qualified Streamly.Internal.Data.Array as A
import qualified Streamly.Internal.Data.Array as Array
import qualified Streamly.Internal.Data.Array.Type as A
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.Array.Mut.Stream as AS
import qualified Streamly.Internal.Data.MutArray.Type as MA
import qualified Streamly.Internal.Data.Stream.MutChunked as AS
import qualified Streamly.Internal.Data.Fold.Type as FL (Fold(..), Step(..))
import qualified Streamly.Internal.Data.Parser as PR
import qualified Streamly.Internal.Data.Parser as PRD
@ -206,7 +206,7 @@ unlines sep (D.Stream step state) = D.Stream step' (OuterLoop state)
-------------------------------------------------------------------------------
-- XXX These would not be needed once we implement compactLEFold, see
-- module Streamly.Internal.Data.Array.Mut.Stream
-- module Streamly.Internal.Data.Stream.MutChunked
--
-- XXX Note that this thaws immutable arrays for appending, that may be
-- problematic if multiple users do the same thing, however, immutable arrays

View File

@ -1,5 +1,5 @@
-- |
-- Module : Streamly.Internal.Data.Array.Mut.Stream
-- Module : Streamly.Internal.Data.Stream.MutChunked
-- Copyright : (c) 2019 Composewell Technologies
-- License : BSD3-3-Clause
-- Maintainer : streamly@composewell.com
@ -8,7 +8,7 @@
--
-- Combinators to efficiently manipulate streams of mutable arrays.
--
module Streamly.Internal.Data.Array.Mut.Stream
module Streamly.Internal.Data.Stream.MutChunked
(
-- * Generation
chunksOf
@ -32,13 +32,13 @@ import Control.Monad (when)
import Data.Bifunctor (first)
import Data.Proxy (Proxy(..))
import Streamly.Internal.Data.Unbox (Unbox, sizeOf)
import Streamly.Internal.Data.Array.Mut.Type (MutArray(..))
import Streamly.Internal.Data.MutArray.Type (MutArray(..))
import Streamly.Internal.Data.Fold.Type (Fold(..))
import Streamly.Internal.Data.Parser (ParseError)
import Streamly.Internal.Data.Stream.StreamD.Type (Stream)
import Streamly.Internal.Data.Tuple.Strict (Tuple'(..))
import qualified Streamly.Internal.Data.Array.Mut.Type as MArray
import qualified Streamly.Internal.Data.MutArray.Type as MArray
import qualified Streamly.Internal.Data.Fold.Type as FL
import qualified Streamly.Internal.Data.Parser as ParserD
import qualified Streamly.Internal.Data.Stream as D
@ -92,7 +92,7 @@ packArraysChunksOf n (D.Stream step state) =
step' gst (SpliceInitial st) = do
when (n <= 0) $
-- XXX we can pass the module string from the higher level API
error $ "Streamly.Internal.Data.Array.Mut.Type.packArraysChunksOf: the size of "
error $ "Streamly.Internal.Data.MutArray.Type.packArraysChunksOf: the size of "
++ "arrays [" ++ show n ++ "] must be a natural number"
r <- step gst st
case r of
@ -139,7 +139,7 @@ lpackArraysChunksOf n (Fold step1 initial1 extract1) =
initial = do
when (n <= 0) $
-- XXX we can pass the module string from the higher level API
error $ "Streamly.Internal.Data.Array.Mut.Type.packArraysChunksOf: the size of "
error $ "Streamly.Internal.Data.MutArray.Type.packArraysChunksOf: the size of "
++ "arrays [" ++ show n ++ "] must be a natural number"
r <- initial1
@ -243,7 +243,7 @@ compactLEParserD n = ParserD.Parser step initial extract
extract (Just buf) = return $ ParserD.Done 0 buf
functionPath =
"Streamly.Internal.Data.Array.Mut.Stream.compactLEParserD"
"Streamly.Internal.Data.Stream.MutChunked.compactLEParserD"
-- | Coalesce adjacent arrays in incoming stream to form bigger arrays of a
-- minimum specified size. Note that if all the arrays in the stream together
@ -292,7 +292,7 @@ compactGEFold n = Fold step initial extract
extract (Just buf) = return buf
functionPath =
"Streamly.Internal.Data.Array.Mut.Stream.compactGEFold"
"Streamly.Internal.Data.Stream.MutChunked.compactGEFold"
-- | Coalesce adjacent arrays in incoming stream to form bigger arrays of a
-- maximum specified size in bytes.

View File

@ -38,7 +38,7 @@ import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import qualified Streamly.Data.Fold as Fold
import qualified Streamly.Internal.Data.Array.Generic as Array
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.MutArray.Type as MA
import qualified Streamly.Internal.Data.Stream.StreamD.Type as Stream
import qualified Streamly.Internal.Data.Stream.StreamD.Nesting as Stream
import qualified Streamly.Internal.Data.Stream.StreamD.Generate as Stream

View File

@ -133,7 +133,7 @@ import qualified Streamly.Data.Fold as FL
import qualified Streamly.Data.Array as A
import qualified Streamly.Internal.Data.Array.Type as A
import qualified Streamly.Internal.Data.Stream.Chunked as AS
import qualified Streamly.Internal.Data.Array.Mut.Type as MArray
import qualified Streamly.Internal.Data.MutArray.Type as MArray
import qualified Streamly.Internal.Data.Refold.Type as Refold
import qualified Streamly.Internal.Data.Fold.Type as FL(refoldMany)
import qualified Streamly.Internal.Data.Stream as S

View File

@ -102,7 +102,7 @@ import GHC.IO.Encoding.Failure (isSurrogate)
import GHC.Ptr (Ptr (..), plusPtr)
import System.IO.Unsafe (unsafePerformIO)
import Streamly.Internal.Data.Array.Type (Array(..))
import Streamly.Internal.Data.Array.Mut.Type (MutableByteArray)
import Streamly.Internal.Data.MutArray.Type (MutableByteArray)
import Streamly.Internal.Data.Fold (Fold)
import Streamly.Internal.Data.Stream (Stream)
import Streamly.Internal.Data.Stream (Step (..))

View File

@ -307,10 +307,10 @@ library
-- Unboxed IORef
, Streamly.Internal.Data.IORef.Unboxed
-- May depend on streamly-core-stream
, Streamly.Internal.Data.Array.Mut.Type
, Streamly.Internal.Data.Array.Mut
, Streamly.Internal.Data.MutArray.Type
, Streamly.Internal.Data.MutArray
, Streamly.Internal.Data.Array.Type
, Streamly.Internal.Data.Array.Generic.Mut.Type
, Streamly.Internal.Data.MutArray.Generic
-- streamly-core-streams
, Streamly.Internal.Data.StreamK
@ -352,7 +352,7 @@ library
-- streamly-core-data-arrays
, Streamly.Internal.Data.Array.Generic
, Streamly.Internal.Data.Array
, Streamly.Internal.Data.Array.Mut.Stream
, Streamly.Internal.Data.Stream.MutChunked
-- streamly-serde
, Streamly.Internal.Serialize.FromBytes

View File

@ -225,7 +225,7 @@ Unboxed arrays, based on `Prim` type class:
Mutable arrays are a generalization of immutable arrays:
* `Streamly.Data.Array.Mut`
* `Streamly.Data.MutArray`
* `Streamly.Data.Array.Storable.Mut`
* `Streamly.Data.Array.Storable.Pinned.Mut`
* ...

View File

@ -20,8 +20,8 @@ cradle:
component: "bench:Data.Array"
- path: "./benchmark/Streamly/Benchmark/Data/Array/Generic.hs"
component: "bench:Data.Array.Generic"
- path: "./benchmark/Streamly/Benchmark/Data/Array/Mut.hs"
component: "bench:Data.Array.Mut"
- path: "./benchmark/Streamly/Benchmark/Data/MutArray.hs"
component: "bench:Data.MutArray"
- path: "./benchmark/Streamly/Benchmark/Data/Array/Stream.hs"
component: "bench:Data.Array.Stream"
- path: "./benchmark/Streamly/Benchmark/Data/Fold.hs"
@ -98,8 +98,8 @@ cradle:
component: "test:Data.Stream"
- path: "./test/Streamly/Test/Data/Array/Generic.hs"
component: "test:Data.Array.Generic"
- path: "./test/Streamly/Test/Data/Array/Mut.hs"
component: "test:Data.Array.Mut"
- path: "./test/Streamly/Test/Data/MutArray.hs"
component: "test:Data.MutArray"
- path: "./test/Streamly/Test/Data/Array/Stream.hs"
component: "test:Data.Array.Stream"
- path: "./test/Streamly/Test/Data/Fold.hs"

View File

@ -145,8 +145,8 @@ import qualified Streamly.Internal.System.IOVec.Type as RawIO
import qualified Streamly.Data.Array as A
import qualified Streamly.Data.Fold as FL
import qualified Streamly.Internal.Data.Array.Mut as MArray
(MutArray(..), pinnedNewBytes, asPtrUnsafe)
import qualified Streamly.Internal.Data.MutArray as MArray
(MutArray(..), asPtrUnsafe)
import qualified Streamly.Internal.Data.Stream.Chunked as AS
import qualified Streamly.Internal.Data.Stream as S
import qualified Streamly.Internal.Data.Stream.StreamD.Type as D

View File

@ -97,11 +97,9 @@ import Streamly.Internal.System.IO (defaultChunkSize)
import qualified Streamly.Data.Array as A (reader, length)
import qualified Streamly.Data.Fold as FL
import qualified Streamly.Internal.Data.Array.Type as A
( unsafeFreeze, asPtrUnsafe, byteLength, pinnedWriteNUnsafe, pinnedChunksOf
, pinnedWriteN
)
import qualified Streamly.Internal.Data.Array.Mut as MArray
(MutArray(..), pinnedNewBytes, asPtrUnsafe)
(unsafeFreeze, asPtrUnsafe, byteLength, pinnedChunksOf, pinnedWriteN, pinnedWriteNUnsafe)
import qualified Streamly.Internal.Data.MutArray as MArray
(MutArray(..), asPtrUnsafe, pinnedNewBytes)
import qualified Streamly.Internal.Data.Stream as S
import qualified Streamly.Internal.Data.Stream.StreamD.Type as D
(Stream(..), Step(..))

View File

@ -30,12 +30,12 @@ where
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO(..))
import Foreign.Ptr (castPtr)
import Streamly.Internal.Data.Array.Mut.Type (length)
import Streamly.Internal.Data.MutArray.Type (length)
import Streamly.Internal.Data.SVar.Type (adaptState)
import Streamly.Internal.Data.Array.Mut.Type (Array(..))
import Streamly.Internal.Data.MutArray.Type (Array(..))
import qualified Streamly.Internal.Data.Array.Type as Array
import qualified Streamly.Internal.Data.Array.Mut.Type as MArray
import qualified Streamly.Internal.Data.MutArray.Type as MArray
import qualified Streamly.Internal.Data.Stream as D
-}
#endif
@ -69,11 +69,11 @@ groupIOVecsOfMut n maxIOVLen (D.Stream step state) =
step' gst (GatherInitial st) = do
when (n <= 0) $
-- XXX we can pass the module string from the higher level API
error $ "Streamly.Internal.Data.Array.Mut.Type.groupIOVecsOf: the size of "
error $ "Streamly.Internal.Data.MutArray.Type.groupIOVecsOf: the size of "
++ "groups [" ++ show n ++ "] must be a natural number"
when (maxIOVLen <= 0) $
-- XXX we can pass the module string from the higher level API
error $ "Streamly.Internal.Data.Array.Mut.Type.groupIOVecsOf: the number of "
error $ "Streamly.Internal.Data.MutArray.Type.groupIOVecsOf: the number of "
++ "IOVec entries [" ++ show n ++ "] must be a natural number"
r <- step (adaptState gst) st
case r of

View File

@ -69,7 +69,7 @@ extra-source-files:
benchmark/Streamly/Benchmark/Data/Array/SmallArray.hs
benchmark/Streamly/Benchmark/Data/Array.hs
benchmark/Streamly/Benchmark/Data/Ring/Unboxed.hs
benchmark/Streamly/Benchmark/Data/Array/Mut.hs
benchmark/Streamly/Benchmark/Data/MutArray.hs
benchmark/Streamly/Benchmark/Data/Array/Stream.hs
benchmark/Streamly/Benchmark/Data/Fold/Window.hs
benchmark/Streamly/Benchmark/Data/Stream/*.hs
@ -104,7 +104,7 @@ extra-source-files:
test/Streamly/Test/Data/Array/Common.hs
test/Streamly/Test/Data/Array/Generic.hs
test/Streamly/Test/Data/Array.hs
test/Streamly/Test/Data/Array/Mut.hs
test/Streamly/Test/Data/MutArray.hs
test/Streamly/Test/Data/Ring/Unboxed.hs
test/Streamly/Test/Data/Array/Stream.hs
test/Streamly/Test/Data/Parser/ParserD.hs

View File

@ -166,7 +166,7 @@ targets =
, "pinned_array_cmp"
]
)
, ("Data.Array.Mut",
, ("Data.MutArray",
[ "array_grp"
, "array_cmp"
]

View File

@ -15,12 +15,12 @@ import Data.Word(Word8)
import Foreign.Storable (peek)
import GHC.Ptr (plusPtr)
import Streamly.Internal.Data.Unbox (Unbox, sizeOf)
import Streamly.Internal.Data.Array.Mut.Type (MutArray)
import Streamly.Internal.Data.MutArray.Type (MutArray)
import Test.QuickCheck (chooseInt, listOf)
import qualified Streamly.Internal.Data.Array as A
import qualified Streamly.Internal.Data.Array.Type as A
import qualified Streamly.Internal.Data.Array.Mut.Type as MA
import qualified Streamly.Internal.Data.MutArray.Type as MA
#include "Streamly/Test/Data/Array/CommonImports.hs"

View File

@ -23,7 +23,7 @@ import Test.QuickCheck.Monadic (monadicIO, assert, run)
import qualified Data.Map
import qualified Prelude
import qualified Streamly.Internal.Data.Array.Mut as MArray
import qualified Streamly.Internal.Data.MutArray as MArray
import qualified Streamly.Internal.Data.Fold as Fold
import qualified Streamly.Internal.Data.Fold.Container as Fold
import qualified Streamly.Internal.Data.Stream as Stream

View File

@ -1,4 +1,4 @@
module Streamly.Test.Data.Array.Mut (main) where
module Streamly.Test.Data.MutArray (main) where
import Test.QuickCheck (listOf)
@ -23,7 +23,7 @@ import Test.QuickCheck.Monadic (monadicIO, assert)
import GHC.RTS.Flags (IoSubSystem(..))
#endif
import qualified Streamly.Internal.Data.Array.Mut as MArray
import qualified Streamly.Internal.Data.MutArray as MArray
import qualified Streamly.Internal.Data.Stream as Stream
import qualified Test.Hspec as Hspec
@ -31,7 +31,7 @@ maxTestCount :: Int
maxTestCount = 100
moduleName :: String
moduleName = "Data.Array.Mut"
moduleName = "Data.MutArray"
testAppend :: Property
testAppend =

View File

@ -248,11 +248,11 @@ test-suite Data.Stream
main-is: Streamly/Test/Data/Stream.hs
ghc-options: -main-is Streamly.Test.Data.Stream.main
test-suite Data.Array.Mut
test-suite Data.MutArray
import: test-options
type: exitcode-stdio-1.0
main-is: Streamly/Test/Data/Array/Mut.hs
ghc-options: -main-is Streamly.Test.Data.Array.Mut.main
main-is: Streamly/Test/Data/MutArray.hs
ghc-options: -main-is Streamly.Test.Data.MutArray.main
test-suite Data.Ring.Unboxed
import: test-options