@@ -294,14 +294,18 @@ fromCString# addr# = do
294-- allocated to size N, if the list terminates before N elements then the
294-- allocated to size N, if the list terminates before N elements then the
295-- array may hold less than N elements.
295-- array may hold less than N elements.
297+-- /Since 0.7.0 (Streamly.Memory.Array)/
297−-- @since 0.7.0
299+-- @since 0.8.0
298{-# INLINABLE fromListN #-}
300{-# INLINABLE fromListN #-}
299fromListN :: Storable a => Int -> [a] -> Array a
301fromListN :: Storable a => Int -> [a] -> Array a
300fromListN n xs = unsafeFreeze $ MA.fromListN n xs
302fromListN n xs = unsafeFreeze $ MA.fromListN n xs
302-- | Create an 'Array' from a list. The list must be of finite size.
304-- | Create an 'Array' from a list. The list must be of finite size.
306+-- /Since 0.7.0 (Streamly.Memory.Array)/
304−-- @since 0.7.0
308+-- @since 0.8.0
305{-# INLINABLE fromList #-}
309{-# INLINABLE fromList #-}
306fromList :: Storable a => [a] -> Array a
310fromList :: Storable a => [a] -> Array a
307fromList xs = unsafeFreeze $ MA.fromList xs
311fromList xs = unsafeFreeze $ MA.fromList xs
@@ -388,7 +392,9 @@ byteLength = MA.byteLength . unsafeThaw
388-- | /O(1)/ Get the length of the array i.e. the number of elements in the
392-- | /O(1)/ Get the length of the array i.e. the number of elements in the
395+-- /Since 0.7.0 (Streamly.Memory.Array)/
391−-- @since 0.7.0
397+-- @since 0.8.0
392{-# INLINE length #-}
398{-# INLINE length #-}
393length :: forall a. Storable a => Array a -> Int
399length :: forall a. Storable a => Array a -> Int
394length arr = MA.length (unsafeThaw arr)
400length arr = MA.length (unsafeThaw arr)
@@ -456,7 +462,9 @@ splitAt i arr = (unsafeFreeze a, unsafeFreeze b)
457-- | Convert an 'Array' into a list.
463-- | Convert an 'Array' into a list.
465+-- /Since 0.7.0 (Streamly.Memory.Array)/
459−-- @since 0.7.0
467+-- @since 0.8.0
460{-# INLINE toList #-}
468{-# INLINE toList #-}
461toList :: Storable a => Array a -> [a]
469toList :: Storable a => Array a -> [a]
462toList = MA.toList . unsafeThaw
470toList = MA.toList . unsafeThaw
@@ -468,7 +476,9 @@ toList = MA.toList . unsafeThaw
468-- | @writeN n@ folds a maximum of @n@ elements from the input stream to an
476-- | @writeN n@ folds a maximum of @n@ elements from the input stream to an
469-- 'Array'.
477-- 'Array'.
479+-- /Since 0.7.0 (Streamly.Memory.Array)/
471−-- @since 0.7.0
481+-- @since 0.8.0
472{-# INLINE_NORMAL writeN #-}
482{-# INLINE_NORMAL writeN #-}
473writeN :: forall m a. (MonadIO m, Storable a) => Int -> Fold m a (Array a)
483writeN :: forall m a. (MonadIO m, Storable a) => Int -> Fold m a (Array a)
474writeN = fmap unsafeFreeze . MA.writeN
484writeN = fmap unsafeFreeze . MA.writeN
@@ -531,7 +541,9 @@ toArrayMinChunk alignSize elemCount =
532-- /Caution! Do not use this on infinite streams./
542-- /Caution! Do not use this on infinite streams./
544+-- /Since 0.7.0 (Streamly.Memory.Array)/
534−-- @since 0.7.0
546+-- @since 0.8.0
535{-# INLINE write #-}
547{-# INLINE write #-}
536write :: forall m a. (MonadIO m, Storable a) => Fold m a (Array a)
548write :: forall m a. (MonadIO m, Storable a) => Fold m a (Array a)
537write = fmap unsafeFreeze MA.write
549write = fmap unsafeFreeze MA.write