@@ -17,42 +17,27 @@ module Streamly.Internal.Data.Array
1717 -- $design
1818
1919 -- * The Array Type
20− Array
20+ module Streamly.Internal.Data.Array.Type
2121
2222 -- * Construction
23−
24− -- Pure List APIs
25− , A.fromListN
26− , A.fromList
27−
2823 -- Stream Folds
2924 , fromStreamN
3025 , fromStream
3126
3227 -- Monadic Folds
33− , A.writeN -- drop new
34− , A.pinnedWriteNAligned
35− , A.write -- full buffer
3628 , writeLastN
3729
3830 -- * Elimination
3931 -- ** Conversion
40− , A.toList
41−
42− -- ** Streams
43− , A.read
44− , A.readRev
4532
4633 -- ** Unfolds
4734 , reader
4835 , readerUnsafe
49− , A.readerRev
5036 , producer -- experimental
5137
5238 -- * Random Access
5339 -- , (!!)
5440 , getIndex
55− , A.unsafeIndex -- XXX Rename to getIndexUnsafe??
5641 , getIndexRev
5742 , last -- XXX getIndexLast?
5843 , getIndices
@@ -64,7 +49,6 @@ module Streamly.Internal.Data.Array
6449 -- , getIndicesUptoRev -- read from end to the given position in file
6550
6651 -- * Size
67− , length
6852 , null
6953
7054 -- * Search
@@ -77,10 +61,7 @@ module Streamly.Internal.Data.Array
7761 , cast
7862 , asBytes
7963 , castUnsafe
80− , asPtrUnsafe
8164 , asCStringUnsafe
82− , A.unsafeFreeze -- asImmutableUnsafe?
83− , A.unsafeThaw -- asMutableUnsafe?
8465
8566 -- * Subarrays
8667 , getSliceUnsafe
@@ -95,10 +76,6 @@ module Streamly.Internal.Data.Array
9576 -- ** Folding
9677 , streamFold
9778 , fold
98−
99− -- * Deprecated
100− , A.toStream
101− , A.toStreamRev
10279 )
10380where
10481
@@ -117,9 +94,6 @@ import Foreign.Storable (Storable)
11794import Streamly.Internal.Data.Unbox (Unbox(..))
11895import Prelude hiding (length, null, last, map, (!!), read, concat)
11996
120−import Streamly.Internal.Data.MutArray.Type (ArrayUnsafe(..))
121−import Streamly.Internal.Data.Array.Type
122− (Array(..), length, asPtrUnsafe)
12397import Streamly.Internal.Data.Fold.Type (Fold(..))
12498import Streamly.Internal.Data.Producer.Type (Producer(..))
12599import Streamly.Internal.Data.Stream (Stream)
@@ -138,6 +112,8 @@ import qualified Streamly.Internal.Data.Stream as D
138112import qualified Streamly.Internal.Data.Stream as Stream
139113import qualified Streamly.Internal.Data.Unfold as Unfold
140114
115+import Streamly.Internal.Data.Array.Type
116+
141117#include "DocTestDataArray.hs"
142118
143119-- $design
@@ -241,7 +217,6 @@ readerUnsafe = Unfold step inject
241217
242218-- |
243219--
244−-- >>> import qualified Streamly.Internal.Data.Array.Type as Array
245220-- >>> null arr = Array.byteLength arr == 0
246221--
247222-- /Pre-release/
@@ -264,7 +239,6 @@ getIndexRev i arr =
264239
265240-- |
266241--
267−-- >>> import qualified Streamly.Internal.Data.Array as Array
268242-- >>> last arr = Array.getIndexRev arr 0
269243--
270244-- /Pre-release/