@@ -17,42 +17,27 @@ module Streamly.Internal.Data.Array
17 -- $design
17 -- $design
19 -- * The Array Type
19 -- * The Array Type
20− Array
20+ module Streamly.Internal.Data.Array.Type
22 -- * Construction
22 -- * Construction
28 -- Stream Folds
23 -- Stream Folds
29 , fromStreamN
24 , fromStreamN
30 , fromStream
25 , fromStream
32 -- Monadic Folds
27 -- Monadic Folds
33− , A.writeN -- drop new
34− , A.pinnedWriteNAligned
35− , A.write -- full buffer
36 , writeLastN
28 , writeLastN
38 -- * Elimination
30 -- * Elimination
39 -- ** Conversion
31 -- ** Conversion
46 -- ** Unfolds
33 -- ** Unfolds
48 , readerUnsafe
35 , readerUnsafe
50 , producer -- experimental
36 , producer -- experimental
52 -- * Random Access
38 -- * Random Access
54 , getIndex
40 , getIndex
55− , A.unsafeIndex -- XXX Rename to getIndexUnsafe??
56 , getIndexRev
41 , getIndexRev
57 , last -- XXX getIndexLast?
42 , last -- XXX getIndexLast?
58 , getIndices
43 , getIndices
@@ -64,7 +49,6 @@ module Streamly.Internal.Data.Array
64 -- , getIndicesUptoRev -- read from end to the given position in file
49 -- , getIndicesUptoRev -- read from end to the given position in file
70 -- * Search
54 -- * Search
@@ -77,10 +61,7 @@ module Streamly.Internal.Data.Array
79 , castUnsafe
63 , castUnsafe
81 , asCStringUnsafe
64 , asCStringUnsafe
82− , A.unsafeFreeze -- asImmutableUnsafe?
83− , A.unsafeThaw -- asMutableUnsafe?
85 -- * Subarrays
66 -- * Subarrays
86 , getSliceUnsafe
67 , getSliceUnsafe
@@ -95,10 +76,6 @@ module Streamly.Internal.Data.Array
95 -- ** Folding
76 -- ** Folding
96 , streamFold
77 , streamFold
@@ -117,9 +94,6 @@ import Foreign.Storable (Storable)
117import Streamly.Internal.Data.Unbox (Unbox(..))
94import Streamly.Internal.Data.Unbox (Unbox(..))
118import Prelude hiding (length, null, last, map, (!!), read, concat)
95import Prelude hiding (length, null, last, map, (!!), read, concat)
120−import Streamly.Internal.Data.MutArray.Type (ArrayUnsafe(..))
121−import Streamly.Internal.Data.Array.Type
122− (Array(..), length, asPtrUnsafe)
123import Streamly.Internal.Data.Fold.Type (Fold(..))
97import Streamly.Internal.Data.Fold.Type (Fold(..))
124import Streamly.Internal.Data.Producer.Type (Producer(..))
98import Streamly.Internal.Data.Producer.Type (Producer(..))
125import Streamly.Internal.Data.Stream (Stream)
99import Streamly.Internal.Data.Stream (Stream)
@@ -138,6 +112,8 @@ import qualified Streamly.Internal.Data.Stream as D
138import qualified Streamly.Internal.Data.Stream as Stream
112import qualified Streamly.Internal.Data.Stream as Stream
139import qualified Streamly.Internal.Data.Unfold as Unfold
113import qualified Streamly.Internal.Data.Unfold as Unfold
115+import Streamly.Internal.Data.Array.Type
141#include "DocTestDataArray.hs"
117#include "DocTestDataArray.hs"
143-- $design
119-- $design
@@ -241,7 +217,6 @@ readerUnsafe = Unfold step inject
244−-- >>> import qualified Streamly.Internal.Data.Array.Type as Array
245-- >>> null arr = Array.byteLength arr == 0
220-- >>> null arr = Array.byteLength arr == 0
247-- /Pre-release/
222-- /Pre-release/
@@ -264,7 +239,6 @@ getIndexRev i arr =
267−-- >>> import qualified Streamly.Internal.Data.Array as Array
268-- >>> last arr = Array.getIndexRev arr 0
242-- >>> last arr = Array.getIndexRev arr 0
270-- /Pre-release/
244-- /Pre-release/