on master help sign in
rename Streamly.Array to Streamly.Mem.Array
8bcbc77Harendra Kumar
benchmark/Array.hs+1−1
@@ -13,7 +13,7 @@ import System.Random (randomRIO)
13import qualified GHC.Exts as GHC
13import qualified GHC.Exts as GHC
14
14
15import qualified ArrayOps as Ops
15import qualified ArrayOps as Ops
16−import qualified Streamly.Array as A
16+import qualified Streamly.Mem.Array as A
17import qualified Streamly.Prelude as S
17import qualified Streamly.Prelude as S
18
18
19import Gauge
19import Gauge
benchmark/ArrayOps.hs+3−3
@@ -25,9 +25,9 @@ import qualified GHC.Exts as GHC
25-- import Control.DeepSeq (NFData)
25-- import Control.DeepSeq (NFData)
26-- import GHC.Generics (Generic)
26-- import GHC.Generics (Generic)
27
27
28−import qualified Streamly as S hiding (foldMapWith, runStream)
28+import qualified Streamly as S hiding (foldMapWith, runStream)
29−import qualified Streamly.Prelude as S
29+import qualified Streamly.Mem.Array as A
30−import qualified Streamly.Array as A
30+import qualified Streamly.Prelude as S
31
31
32value, maxValue :: Int
32value, maxValue :: Int
33#ifdef LINEAR_ASYNC
33#ifdef LINEAR_ASYNC
benchmark/FileIO.hs+1−1
@@ -15,8 +15,8 @@ import System.Process.Typed (shell, runProcess_)
15import Data.IORef
15import Data.IORef
16import Gauge
16import Gauge
17
17
18−import qualified Streamly.Array as A
19import qualified Streamly.FileSystem.File as File
18import qualified Streamly.FileSystem.File as File
19+import qualified Streamly.Mem.Array as A
20import qualified Streamly.Prelude as S
20import qualified Streamly.Prelude as S
21
21
22#ifdef DEVBUILD
22#ifdef DEVBUILD
benchmark/Linear.hs+2−2
@@ -15,8 +15,8 @@ import qualified GHC.Exts as GHC
15import qualified LinearOps as Ops
15import qualified LinearOps as Ops
16
16
17import Streamly
17import Streamly
18−import qualified Streamly.Array as A
18+import qualified Streamly.Fold as FL
19−import qualified Streamly.Fold as FL
19+import qualified Streamly.Mem.Array as A
20import qualified Streamly.Prelude as S
20import qualified Streamly.Prelude as S
21-- import qualified Streamly.Sink as Sink
21-- import qualified Streamly.Sink as Sink
22import Gauge
22import Gauge
src/Streamly/FileSystem/File.hs+9−9
@@ -4,7 +4,7 @@
4{-# LANGUAGE RecordWildCards #-}
4{-# LANGUAGE RecordWildCards #-}
5{-# LANGUAGE UnboxedTuples #-}
5{-# LANGUAGE UnboxedTuples #-}
6
6
7−#include "../Streams/inline.hs"
7+#include "inline.hs"
8
8
9-- |
9-- |
10-- Module : Streamly.FileSystem.File
10-- Module : Streamly.FileSystem.File
@@ -16,11 +16,11 @@
16-- Portability : GHC
16-- Portability : GHC
17--
17--
18-- Read and write streams and arrays to and from files. File IO APIs are quite
18-- Read and write streams and arrays to and from files. File IO APIs are quite
19−-- similar to "Streamly.Array" read write APIs. In that regard, arrays can be
19+-- similar to "Streamly.Mem.Array" read write APIs. In that regard, arrays can
20−-- considered as in-memory files or files can be considered as on-disk arrays.
20+-- be considered as in-memory files or files can be considered as on-disk
21−-- IO APIs are divided into two categories, sequential streaming IO APIs and
21+-- arrays. IO APIs are divided into two categories, sequential streaming IO
22−-- random access IO APIs. Control over the file reading and writing behavior
22+-- APIs and random access IO APIs. Control over the file reading and writing
23−-- in terms of buffering, encoding, decoding is in the hands of the
23+-- behavior in terms of buffering, encoding, decoding is in the hands of the
24-- programmer, the 'TextEncoding', 'NewLineMode', and 'Buffering' options of
24-- programmer, the 'TextEncoding', 'NewLineMode', and 'Buffering' options of
25-- the underlying handle provided by GHC are not needed and ignored.
25-- the underlying handle provided by GHC are not needed and ignored.
26--
26--
@@ -108,14 +108,14 @@ import GHC.ForeignPtr (mallocPlainForeignPtrBytes)
108import System.IO (Handle, hGetBufSome, hPutBuf)
108import System.IO (Handle, hGetBufSome, hPutBuf)
109import Prelude hiding (read)
109import Prelude hiding (read)
110
110
111−import Streamly.Array.Types (Array(..))
111+import Streamly.Mem.Array.Types (Array(..))
112import Streamly.Streams.Serial (SerialT)
112import Streamly.Streams.Serial (SerialT)
113import Streamly.Streams.StreamK.Type (IsStream, mkStream)
113import Streamly.Streams.StreamK.Type (IsStream, mkStream)
114-- import Streamly.Fold (Fold)
114-- import Streamly.Fold (Fold)
115-- import Streamly.String (encodeUtf8, decodeUtf8, foldLines)
115-- import Streamly.String (encodeUtf8, decodeUtf8, foldLines)
116
116
117−import qualified Streamly.Array as A
117+import qualified Streamly.Mem.Array as A
118−import qualified Streamly.Array.Types as A hiding (flattenArrays)
118+import qualified Streamly.Mem.Array.Types as A hiding (flattenArrays)
119import qualified Streamly.Prelude as S
119import qualified Streamly.Prelude as S
120
120
121-------------------------------------------------------------------------------
121-------------------------------------------------------------------------------
src/Streamly/Fold.hs+2−2
@@ -317,14 +317,14 @@ import Prelude
317import qualified Data.Map.Strict as Map
317import qualified Data.Map.Strict as Map
318
318
319import Streamly (MonadAsync, parallel)
319import Streamly (MonadAsync, parallel)
320−import Streamly.Array (Array)
321import Streamly.Fold.Types (Fold(..))
320import Streamly.Fold.Types (Fold(..))
321+import Streamly.Mem.Array (Array)
322import Streamly.Streams.Serial (SerialT)
322import Streamly.Streams.Serial (SerialT)
323import Streamly.Streams.StreamK (IsStream())
323import Streamly.Streams.StreamK (IsStream())
324
324
325import Streamly.Strict
325import Streamly.Strict
326
326
327−import qualified Streamly.Array as A
327+import qualified Streamly.Mem.Array as A
328import qualified Streamly.Prelude as S
328import qualified Streamly.Prelude as S
329import qualified Streamly.Streams.StreamD as D
329import qualified Streamly.Streams.StreamD as D
330import qualified Streamly.Streams.StreamK as K
330import qualified Streamly.Streams.StreamK as K
src/Streamly/Array.hs → src/Streamly/Mem/Array.hsrenamed+5−6
@@ -5,10 +5,10 @@
5{-# LANGUAGE UnboxedTuples #-}
5{-# LANGUAGE UnboxedTuples #-}
6{-# LANGUAGE ScopedTypeVariables #-}
6{-# LANGUAGE ScopedTypeVariables #-}
7
7
8−#include "Streams/inline.hs"
8+#include "inline.hs"
9
9
10-- |
10-- |
11−-- Module : Streamly.Array
11+-- Module : Streamly.Mem.Array
12-- Copyright : (c) 2019 Harendra Kumar
12-- Copyright : (c) 2019 Harendra Kumar
13--
13--
14-- License : BSD3
14-- License : BSD3
@@ -76,7 +76,7 @@
76-- arbitrarily large amounts of memory but still using small chunks of
76-- arbitrarily large amounts of memory but still using small chunks of
77-- contiguous memory.
77-- contiguous memory.
78
78
79−module Streamly.Array
79+module Streamly.Mem.Array
80 (
80 (
81 Array
81 Array
82
82
@@ -137,12 +137,11 @@ import Foreign.Ptr (minusPtr, plusPtr, castPtr)
137import Foreign.Storable (Storable(..))
137import Foreign.Storable (Storable(..))
138import Prelude hiding (length, null, last, map, (!!), read)
138import Prelude hiding (length, null, last, map, (!!), read)
139
139
140−import Streamly.Array.Types hiding (flattenArrays, newArray)
140+import Streamly.Mem.Array.Types hiding (flattenArrays, newArray)
141import Streamly.Streams.Serial (SerialT)
141import Streamly.Streams.Serial (SerialT)
142import Streamly.Streams.StreamK.Type (IsStream)
142import Streamly.Streams.StreamK.Type (IsStream)
143
143
144−
145−import qualified Streamly.Array.Types as A
144+import qualified Streamly.Mem.Array.Types as A
146import qualified Streamly.Prelude as S
145import qualified Streamly.Prelude as S
147import qualified Streamly.Streams.StreamD as D
146import qualified Streamly.Streams.StreamD as D
148
147
src/Streamly/Array/Types.hs → src/Streamly/Mem/Array/Types.hsrenamed+2−2
@@ -10,7 +10,7 @@
10#include "inline.hs"
10#include "inline.hs"
11
11
12-- |
12-- |
13−-- Module : Streamly.Array
13+-- Module : Streamly.Mem.Array.Types
14-- Copyright : (c) 2019 Composewell Technologies
14-- Copyright : (c) 2019 Composewell Technologies
15--
15--
16-- License : BSD3
16-- License : BSD3
@@ -18,7 +18,7 @@
18-- Stability : experimental
18-- Stability : experimental
19-- Portability : GHC
19-- Portability : GHC
20--
20--
21−module Streamly.Array.Types
21+module Streamly.Mem.Array.Types
22 (
22 (
23 Array (..)
23 Array (..)
24
24
src/Streamly/RingBuffer.hs → src/Streamly/Mem/Ring.hsrenamed+21−21
@@ -4,7 +4,7 @@
4{-# LANGUAGE ExistentialQuantification #-}
4{-# LANGUAGE ExistentialQuantification #-}
5
5
6-- |
6-- |
7−-- Module : Streamly.RingBuffer
7+-- Module : Streamly.Mem.Ring
8-- Copyright : (c) 2019 Composewell Technologies
8-- Copyright : (c) 2019 Composewell Technologies
9-- License : BSD3
9-- License : BSD3
10-- Maintainer : harendra.kumar@gmail.com
10-- Maintainer : harendra.kumar@gmail.com
@@ -12,8 +12,8 @@
12-- Portability : GHC
12-- Portability : GHC
13--
13--
14
14
15−module Streamly.RingBuffer
15+module Streamly.Mem.Ring
16− ( RingBuffer(..)
16+ ( Ring(..)
17
17
18 -- * Construction
18 -- * Construction
19 , new
19 , new
@@ -40,7 +40,7 @@ import GHC.ForeignPtr (mallocPlainForeignPtrAlignedBytes)
40import GHC.Ptr (Ptr(..))
40import GHC.Ptr (Ptr(..))
41import Prelude hiding (length, concat)
41import Prelude hiding (length, concat)
42
42
43−import qualified Streamly.Array.Types as A
43+import qualified Streamly.Mem.Array.Types as A
44
44
45-- | A ring buffer is a mutable array of fixed size. Initially the array is
45-- | A ring buffer is a mutable array of fixed size. Initially the array is
46-- empty, with ringStart pointing at the start of allocated memory. We call the
46-- empty, with ringStart pointing at the start of allocated memory. We call the
@@ -54,7 +54,7 @@ import qualified Streamly.Array.Types as A
54-- When using it we should keep in mind that a ringBuffer is a mutable data
54-- When using it we should keep in mind that a ringBuffer is a mutable data
55-- structure. We should not leak out references to it for immutable use.
55-- structure. We should not leak out references to it for immutable use.
56--
56--
57−data RingBuffer a = RingBuffer
57+data Ring a = Ring
58 { ringStart :: !(ForeignPtr a) -- first address
58 { ringStart :: !(ForeignPtr a) -- first address
59 , ringBound :: !(Ptr a) -- first address beyond allocated memory
59 , ringBound :: !(Ptr a) -- first address beyond allocated memory
60 }
60 }
@@ -62,12 +62,12 @@ data RingBuffer a = RingBuffer
62-- | Create a new ringbuffer and return the ring buffer and the ringHead.
62-- | Create a new ringbuffer and return the ring buffer and the ringHead.
63-- Returns the ring and the ringHead, the ringHead is same as ringStart.
63-- Returns the ring and the ringHead, the ringHead is same as ringStart.
64{-# INLINE new #-}
64{-# INLINE new #-}
65−new :: forall a. Storable a => Int -> IO (RingBuffer a, Ptr a)
65+new :: forall a. Storable a => Int -> IO (Ring a, Ptr a)
66new count = do
66new count = do
67 let size = count * sizeOf (undefined :: a)
67 let size = count * sizeOf (undefined :: a)
68 fptr <- mallocPlainForeignPtrAlignedBytes size (alignment (undefined :: a))
68 fptr <- mallocPlainForeignPtrAlignedBytes size (alignment (undefined :: a))
69 let p = unsafeForeignPtrToPtr fptr
69 let p = unsafeForeignPtrToPtr fptr
70− return $ (RingBuffer
70+ return $ (Ring
71 { ringStart = fptr
71 { ringStart = fptr
72 , ringBound = p `plusPtr` size
72 , ringBound = p `plusPtr` size
73 }, p)
73 }, p)
@@ -75,8 +75,8 @@ new count = do
75-- | Advance the ringHead by 1 item, wrap around if we hit the end of the
75-- | Advance the ringHead by 1 item, wrap around if we hit the end of the
76-- array.
76-- array.
77{-# INLINE advance #-}
77{-# INLINE advance #-}
78−advance :: forall a. Storable a => RingBuffer a -> Ptr a -> Ptr a
78+advance :: forall a. Storable a => Ring a -> Ptr a -> Ptr a
79−advance RingBuffer{..} ringHead =
79+advance Ring{..} ringHead =
80 let ptr = ringHead `plusPtr` sizeOf (undefined :: a)
80 let ptr = ringHead `plusPtr` sizeOf (undefined :: a)
81 in if ptr < ringBound
81 in if ptr < ringBound
82 then ptr
82 then ptr
@@ -84,10 +84,10 @@ advance RingBuffer{..} ringHead =
84
84
85-- | Insert an item at the head of the ring, when the ring is full this
85-- | Insert an item at the head of the ring, when the ring is full this
86-- replaces the oldest item in the ring with the new item. This is unsafe
86-- replaces the oldest item in the ring with the new item. This is unsafe
87−-- beause ringHead supplied is not verified to be within the RingBuffer. Also,
87+-- beause ringHead supplied is not verified to be within the Ring. Also,
88-- the ringStart foreignPtr must be guaranteed to be alive by the caller.
88-- the ringStart foreignPtr must be guaranteed to be alive by the caller.
89{-# INLINE unsafeInsert #-}
89{-# INLINE unsafeInsert #-}
90−unsafeInsert :: Storable a => RingBuffer a -> Ptr a -> a -> IO (Ptr a)
90+unsafeInsert :: Storable a => Ring a -> Ptr a -> a -> IO (Ptr a)
91unsafeInsert rb ringHead newVal = do
91unsafeInsert rb ringHead newVal = do
92 poke ringHead newVal
92 poke ringHead newVal
93 -- touchForeignPtr (ringStart rb)
93 -- touchForeignPtr (ringStart rb)
@@ -99,8 +99,8 @@ unsafeInsert rb ringHead newVal = do
99-- the ring buffer. This is unsafe because the ringHead Ptr is not checked to
99-- the ring buffer. This is unsafe because the ringHead Ptr is not checked to
100-- be in range.
100-- be in range.
101{-# INLINE unsafeEqArrayN #-}
101{-# INLINE unsafeEqArrayN #-}
102−unsafeEqArrayN :: RingBuffer a -> Ptr a -> A.Array a -> Int -> Bool
102+unsafeEqArrayN :: Ring a -> Ptr a -> A.Array a -> Int -> Bool
103−unsafeEqArrayN RingBuffer{..} rh A.Array{..} n =
103+unsafeEqArrayN Ring{..} rh A.Array{..} n =
104 let !res = A.unsafeInlineIO $ do
104 let !res = A.unsafeInlineIO $ do
105 let rs = unsafeForeignPtrToPtr ringStart
105 let rs = unsafeForeignPtrToPtr ringStart
106 let as = unsafeForeignPtrToPtr aStart
106 let as = unsafeForeignPtrToPtr aStart
@@ -125,8 +125,8 @@ unsafeEqArrayN RingBuffer{..} rh A.Array{..} n =
125-- supplied array must be equal to or bigger than the ringBuffer, ARRAY BOUNDS
125-- supplied array must be equal to or bigger than the ringBuffer, ARRAY BOUNDS
126-- ARE NOT CHECKED.
126-- ARE NOT CHECKED.
127{-# INLINE unsafeEqArray #-}
127{-# INLINE unsafeEqArray #-}
128−unsafeEqArray :: RingBuffer a -> Ptr a -> A.Array a -> Bool
128+unsafeEqArray :: Ring a -> Ptr a -> A.Array a -> Bool
129−unsafeEqArray RingBuffer{..} rh A.Array{..} =
129+unsafeEqArray Ring{..} rh A.Array{..} =
130 let !res = A.unsafeInlineIO $ do
130 let !res = A.unsafeInlineIO $ do
131 let rs = unsafeForeignPtrToPtr ringStart
131 let rs = unsafeForeignPtrToPtr ringStart
132 let as = unsafeForeignPtrToPtr aStart
132 let as = unsafeForeignPtrToPtr aStart
@@ -151,8 +151,8 @@ unsafeEqArray RingBuffer{..} rh A.Array{..} =
151-- Unsafe because the supplied Ptr is not checked to be in range.
151-- Unsafe because the supplied Ptr is not checked to be in range.
152{-# INLINE unsafeFoldRing #-}
152{-# INLINE unsafeFoldRing #-}
153unsafeFoldRing :: forall a b. Storable a
153unsafeFoldRing :: forall a b. Storable a
154− => Ptr a -> (b -> a -> b) -> b -> RingBuffer a -> b
154+ => Ptr a -> (b -> a -> b) -> b -> Ring a -> b
155−unsafeFoldRing ptr f z RingBuffer{..} =
155+unsafeFoldRing ptr f z Ring{..} =
156 let !res = A.unsafeInlineIO $ withForeignPtr ringStart $ \p ->
156 let !res = A.unsafeInlineIO $ withForeignPtr ringStart $ \p ->
157 go z p ptr
157 go z p ptr
158 in res
158 in res
@@ -166,8 +166,8 @@ unsafeFoldRing ptr f z RingBuffer{..} =
166-- | Like unsafeFoldRing but with a monadic step function.
166-- | Like unsafeFoldRing but with a monadic step function.
167{-# INLINE unsafeFoldRingM #-}
167{-# INLINE unsafeFoldRingM #-}
168unsafeFoldRingM :: forall m a b. (Monad m, Storable a)
168unsafeFoldRingM :: forall m a b. (Monad m, Storable a)
169− => Ptr a -> (b -> a -> m b) -> b -> RingBuffer a -> m b
169+ => Ptr a -> (b -> a -> m b) -> b -> Ring a -> m b
170−unsafeFoldRingM ptr f z RingBuffer{..} = go z (unsafeForeignPtrToPtr ringStart) ptr
170+unsafeFoldRingM ptr f z Ring{..} = go z (unsafeForeignPtrToPtr ringStart) ptr
171 where
171 where
172 go !acc !start !end
172 go !acc !start !end
173 | start == end = return acc
173 | start == end = return acc
@@ -182,8 +182,8 @@ unsafeFoldRingM ptr f z RingBuffer{..} = go z (unsafeForeignPtrToPtr ringStart)
182-- the ring.
182-- the ring.
183{-# INLINE unsafeFoldRingFullM #-}
183{-# INLINE unsafeFoldRingFullM #-}
184unsafeFoldRingFullM :: forall m a b. (Monad m, Storable a)
184unsafeFoldRingFullM :: forall m a b. (Monad m, Storable a)
185− => Ptr a -> (b -> a -> m b) -> b -> RingBuffer a -> m b
185+ => Ptr a -> (b -> a -> m b) -> b -> Ring a -> m b
186−unsafeFoldRingFullM rh f z rb@RingBuffer{..} = go z rh
186+unsafeFoldRingFullM rh f z rb@Ring{..} = go z rh
187 where
187 where
188 go !acc !start = do
188 go !acc !start = do
189 let !x = A.unsafeInlineIO $ peek start
189 let !x = A.unsafeInlineIO $ peek start
src/Streamly/Streams/StreamD.hs+5−4
@@ -242,15 +242,16 @@ import Prelude
242 (!!), scanl, scanl1, concatMap, replicate, enumFromTo, concat,
242 (!!), scanl, scanl1, concatMap, replicate, enumFromTo, concat,
243 reverse)
243 reverse)
244
244
245−import Streamly.Array.Types (Array(..))
245+import Streamly.Mem.Array.Types (Array(..))
246import Streamly.Fold.Types (Fold(..))
246import Streamly.Fold.Types (Fold(..))
247import Streamly.SVar (MonadAsync, defState, adaptState)
247import Streamly.SVar (MonadAsync, defState, adaptState)
248import Streamly.Sink.Types (Sink(..))
248import Streamly.Sink.Types (Sink(..))
249
249
250import Streamly.Streams.StreamD.Type
250import Streamly.Streams.StreamD.Type
251+
252+import qualified Streamly.Mem.Array.Types as A
253+import qualified Streamly.Mem.Ring as RB
251import qualified Streamly.Streams.StreamK as K
254import qualified Streamly.Streams.StreamK as K
252−import qualified Streamly.Array.Types as A
253−import qualified Streamly.RingBuffer as RB
254
255
255------------------------------------------------------------------------------
256------------------------------------------------------------------------------
256-- Construction
257-- Construction
@@ -1141,7 +1142,7 @@ data SplitOnState s a =
1141 | GO_EMPTY_PAT s
1142 | GO_EMPTY_PAT s
1142 | GO_SINGLE_PAT s a
1143 | GO_SINGLE_PAT s a
1143 | GO_SHORT_PAT s
1144 | GO_SHORT_PAT s
1144− | GO_KARP_RABIN s !(RB.RingBuffer a) !(Ptr a)
1145+ | GO_KARP_RABIN s !(RB.Ring a) !(Ptr a)
1145 | GO_DONE
1146 | GO_DONE
1146
1147
1147{-# INLINE_NORMAL splitOn #-}
1148{-# INLINE_NORMAL splitOn #-}
streamly.cabal+14−5
@@ -162,9 +162,17 @@ library
162 hs-source-dirs: src
162 hs-source-dirs: src
163 other-modules: Streamly.Atomics
163 other-modules: Streamly.Atomics
164 , Streamly.SVar
164 , Streamly.SVar
165+ , Streamly.Strict
166+ , Streamly.Enumeration
167+
168+ -- Time
165 , Streamly.Time.Units
169 , Streamly.Time.Units
166 , Streamly.Time.Clock
170 , Streamly.Time.Clock
167
171
172+ -- Memory storage
173+ , Streamly.Mem.Array.Types
174+ , Streamly.Mem.Ring
175+
168 -- Base streams
176 -- Base streams
169 , Streamly.Streams.StreamK.Type
177 , Streamly.Streams.StreamK.Type
170 , Streamly.Streams.StreamK
178 , Streamly.Streams.StreamK
@@ -180,21 +188,22 @@ library
180 , Streamly.Streams.Ahead
188 , Streamly.Streams.Ahead
181 , Streamly.Streams.Zip
189 , Streamly.Streams.Zip
182 , Streamly.Streams.Combinators
190 , Streamly.Streams.Combinators
191+
192+ -- Pure streams
183 , Streamly.List
193 , Streamly.List
184 , Streamly.String
194 , Streamly.String
185− , Streamly.Enumeration
195+
186− , Streamly.Array.Types
196+ -- Folds
187− , Streamly.RingBuffer
188− , Streamly.Strict
189 , Streamly.Fold.Types
197 , Streamly.Fold.Types
190 , Streamly.Sink.Types
198 , Streamly.Sink.Types
191 , Streamly.Sink
199 , Streamly.Sink
192
200
193 exposed-modules: Streamly.Prelude
201 exposed-modules: Streamly.Prelude
194− , Streamly.Array
195 , Streamly.Time
202 , Streamly.Time
196 , Streamly
203 , Streamly
197 , Streamly.Fold
204 , Streamly.Fold
205+
206+ , Streamly.Mem.Array
198 , Streamly.FileSystem.File
207 , Streamly.FileSystem.File
199
208
200 , Streamly.Tutorial
209 , Streamly.Tutorial
test/Arrays.hs+2−3
@@ -6,14 +6,13 @@ module Main (main) where
6import Foreign.Storable (Storable(..))
6import Foreign.Storable (Storable(..))
7
7
8import Test.Hspec.QuickCheck
8import Test.Hspec.QuickCheck
9−import Test.QuickCheck (Property, forAll, Gen, vectorOf, arbitrary,
9+import Test.QuickCheck (Property, forAll, Gen, vectorOf, arbitrary, choose)
10− choose)
11import Test.QuickCheck.Monadic (monadicIO, assert)
10import Test.QuickCheck.Monadic (monadicIO, assert)
12
11
13import Test.Hspec as H
12import Test.Hspec as H
14
13
14+import qualified Streamly.Mem.Array as A
15import qualified Streamly.Prelude as S
15import qualified Streamly.Prelude as S
16−import qualified Streamly.Array as A
17
16
18-- Coverage build takes too long with default number of tests
17-- Coverage build takes too long with default number of tests
19maxTestCount :: Int
18maxTestCount :: Int