@@ -139,10 +139,14 @@ import qualified Streamly.FileSystem.FDIO as RawIO
139139
140140import Streamly.Mem.Array.Types (Array(..))
141141import Streamly.Streams.Serial (SerialT)
142+import Streamly.Streams.StreamK.Type (IsStream, mkStream)
143+import Streamly.Mem.Array.Types (byteLength, defaultChunkSize)
144+
145+#if !defined(mingw32_HOST_OS)
146+import Streamly.Mem.Array.Types (groupIOVecsOf)
142147import Streamly.Streams.StreamD (toStreamD)
143148import Streamly.Streams.StreamD.Type (fromStreamD)
144−import Streamly.Streams.StreamK.Type (IsStream, mkStream)
145−import Streamly.Mem.Array.Types (byteLength, defaultChunkSize, groupIOVecsOf)
149+#endif
146150-- import Streamly.Fold (Fold)
147151-- import Streamly.String (encodeUtf8, decodeUtf8, foldLines)
148152
@@ -249,6 +253,7 @@ writeArray (Handle fd) arr = withForeignPtr (aStart arr) $ \p -> do
249253 where
250254 aLen = byteLength arr
251255
256+#if !defined(mingw32_HOST_OS)
252257-- | Write an array of 'IOVec' to a file handle.
253258--
254259-- @since 0.7.0
@@ -258,6 +263,7 @@ writeIOVec _ iov | A.length iov == 0 = return ()
258263writeIOVec (Handle fd) iov =
259264 withForeignPtr (aStart iov) $ \p ->
260265 RawIO.writevAll fd p (A.length iov)
266+#endif
261267
262268-------------------------------------------------------------------------------
263269-- Stream of Arrays IO
@@ -344,14 +350,6 @@ read = A.flattenArrays . readArrays
344350writeArrays :: (MonadIO m, Storable a) => Handle -> SerialT m (Array a) -> m ()
345351writeArrays h m = S.mapM_ (liftIO . writeArray h) m
346352
347−-- XXX this is incomplete
348−-- | Write a stream of 'IOVec' arrays to a handle.
349−--
350−-- @since 0.7.0
351−{-# INLINE writev #-}
352−writev :: MonadIO m => Handle -> SerialT m (Array RawIO.IOVec) -> m ()
353−writev h m = S.mapM_ (liftIO . writeIOVec h) m
354−
355353-- | Write a stream of arrays to a handle after coalescing them in chunks of
356354-- specified size. The chunk size is only a maximum and the actual writes could
357355-- be smaller than that as we do not split the arrays to fit them to the
@@ -363,6 +361,15 @@ writeArraysPackedUpto :: (MonadIO m, Storable a)
363361 => Int -> Handle -> SerialT m (Array a) -> m ()
364362writeArraysPackedUpto n h xs = writeArrays h $ A.packArraysChunksOf n xs
365363
364+#if !defined(mingw32_HOST_OS)
365+-- XXX this is incomplete
366+-- | Write a stream of 'IOVec' arrays to a handle.
367+--
368+-- @since 0.7.0
369+{-# INLINE writev #-}
370+writev :: MonadIO m => Handle -> SerialT m (Array RawIO.IOVec) -> m ()
371+writev h m = S.mapM_ (liftIO . writeIOVec h) m
372+
366373-- XXX this is incomplete
367374-- | Write a stream of arrays to a handle after grouping them in 'IOVec' arrays
368375-- of up to a maximum total size. Writes are performed using gather IO via
@@ -375,6 +382,7 @@ _writevArraysPackedUpto :: MonadIO m
375382 => Int -> Handle -> SerialT m (Array a) -> m ()
376383_writevArraysPackedUpto n h xs =
377384 writev h $ fromStreamD $ groupIOVecsOf n 512 (toStreamD xs)
385+#endif
378386
379387-- GHC buffer size dEFAULT_FD_BUFFER_SIZE=8192 bytes.
380388--