@@ -494,7 +494,7 @@ data GroupState s start end bound
494494-- | @fromStreamArraysOf n stream@ groups the input stream into a stream of
495495-- arrays of size n.
496496{-# INLINE_NORMAL fromStreamDArraysOf #-}
497−fromStreamDArraysOf :: (MonadIO m, Storable a)
497+fromStreamDArraysOf :: forall m a. (MonadIO m, Storable a)
498498 => Int -> D.Stream m a -> D.Stream m (Array a)
499499-- fromStreamDArraysOf n str = D.groupsOf n (toArrayN n) str
500500fromStreamDArraysOf n (D.Stream step state) =
@@ -516,7 +516,7 @@ fromStreamDArraysOf n (D.Stream step state) =
516516 case r of
517517 D.Yield x s -> do
518518 liftIO $ poke end x
519− let end' = end `plusPtr` 1
519+ let end' = end `plusPtr` sizeOf (undefined :: a)
520520 return $
521521 if end' >= bound
522522 then D.Skip (GroupYield start end' bound (GroupStart s))