@@ -115,7 +115,7 @@ import Streamly.Internal.Data.Consumer.Type (Consumer(..))
115import Streamly.Internal.Data.Unfold.Type (Unfold(..))
115import Streamly.Internal.Data.Unfold.Type (Unfold(..))
116import Streamly.Internal.Data.Array.Foreign.Type
116import Streamly.Internal.Data.Array.Foreign.Type
117 (Array(..), writeNUnsafe, unsafeFreezeWithShrink)
117 (Array(..), writeNUnsafe, unsafeFreezeWithShrink)
118−import Streamly.Internal.Data.Array.Foreign.Mut.Type (mutableArray)
118+import Streamly.Internal.Data.Array.Foreign.Mut.Type (fromForeignPtrUnsafe)
119import Streamly.Internal.Data.Stream.Serial (SerialT)
119import Streamly.Internal.Data.Stream.Serial (SerialT)
120import Streamly.Internal.Data.Stream.IsStream.Type
120import Streamly.Internal.Data.Stream.IsStream.Type
121 (IsStream, mkStream, fromStreamD)
121 (IsStream, mkStream, fromStreamD)
@@ -178,7 +178,7 @@ getChunk size h = liftIO $ do
178 -- XXX shrink only if the diff is significant
178 -- XXX shrink only if the diff is significant
180 unsafeFreezeWithShrink $
180 unsafeFreezeWithShrink $
181− mutableArray ptr (p `plusPtr` n) (p `plusPtr` size)
181+ fromForeignPtrUnsafe ptr (p `plusPtr` n) (p `plusPtr` size)
183-- This could be useful in implementing the "reverse" read APIs or if you want
183-- This could be useful in implementing the "reverse" read APIs or if you want
184-- to read arrays of exact size instead of compacting them later. Compacting
184-- to read arrays of exact size instead of compacting them later. Compacting