@@ -150,7 +150,7 @@ where
151import Control.Monad (when)
151import Control.Monad (when)
152import Control.Monad.IO.Class (MonadIO(..))
152import Control.Monad.IO.Class (MonadIO(..))
153−import Data.Functor.Identity (Identity)
153+-- import Data.Functor.Identity (Identity)
154import Data.Word (Word8)
154import Data.Word (Word8)
155import Foreign.ForeignPtr (withForeignPtr)
155import Foreign.ForeignPtr (withForeignPtr)
156import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
156import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
@@ -402,11 +402,13 @@ toArraysInRange :: (IsStream t, MonadIO m, Storable a)
402toArraysInRange low high (Fold step initial extract) =
402toArraysInRange low high (Fold step initial extract) =
405-- | Fold the input to a pure buffered stream (List) of arrays.
406-- | Fold the input to a pure buffered stream (List) of arrays.
406{-# INLINE _toArraysOf #-}
407{-# INLINE _toArraysOf #-}
407_toArraysOf :: (MonadIO m, Storable a)
408_toArraysOf :: (MonadIO m, Storable a)
408 => Int -> Fold m a (SerialT Identity (Array a))
409 => Int -> Fold m a (SerialT Identity (Array a))
409_toArraysOf n = FL.lchunksOf n (A.toArrayN n) FL.toStream
410_toArraysOf n = FL.lchunksOf n (A.toArrayN n) FL.toStream
411-- XXX The realloc based implementation needs to make one extra copy if we use
413-- XXX The realloc based implementation needs to make one extra copy if we use
412-- shrinkToFit. On the other hand, the stream of arrays implementation may
414-- shrinkToFit. On the other hand, the stream of arrays implementation may