@@ -35,8 +35,6 @@ import Foreign.Storable (Storable(..))
3535import Streamly.Internal.Data.Array.Foreign.Mut.Type (Array(..))
3636import Streamly.Internal.Data.Fold.Type (Fold(..))
3737import Streamly.Internal.Data.Stream.Serial (SerialT(..))
38−import Streamly.Internal.Data.Stream.IsStream.Type
39− (IsStream, fromStreamD, toStreamD)
4038import Streamly.Internal.Data.Tuple.Strict (Tuple'(..))
4139
4240import qualified Streamly.Internal.Data.Array.Foreign.Mut.Type as MArray
@@ -53,9 +51,10 @@ import qualified Streamly.Internal.Data.Parser.ParserD as ParserD
5351--
5452-- /Pre-release/
5553{-# INLINE arraysOf #-}
56−arraysOf :: (IsStream t, MonadIO m, Storable a)
57− => Int -> t m a -> t m (Array a)
58−arraysOf n = fromStreamD . MArray.arraysOf n . toStreamD
54+arraysOf :: (MonadIO m, Storable a)
55+ => Int -> SerialT m a -> SerialT m (Array a)
56+arraysOf n (SerialT xs) =
57+ SerialT $ D.toStreamK $ MArray.arraysOf n $ D.fromStreamK xs
5958
6059-------------------------------------------------------------------------------
6160-- Compact