@@ -564,14 +564,14 @@ dropWhileM f (Stream step state) = Stream step' (DropWhileDrop state)
564564 Yield x s -> do
565565 b <- f x
566566 if b
567− then step' (rstState gst) (DropWhileDrop s)
568− else step' (rstState gst) (DropWhileYield x s)
567+ then step' gst (DropWhileDrop s)
568+ else step' gst (DropWhileYield x s)
569569 Stop -> return Stop
570570
571571 step' gst (DropWhileNext st) = do
572572 r <- step (rstState gst) st
573573 case r of
574− Yield x s -> step' (rstState gst) (DropWhileYield x s)
574+ Yield x s -> step' gst (DropWhileYield x s)
575575 Stop -> return Stop
576576
577577 step' _ (DropWhileYield x st) = return $ Yield x (DropWhileNext st)
@@ -592,7 +592,7 @@ filterM f (Stream step state) = Stream step' state
592592 b <- f x
593593 if b
594594 then return $ Yield x s
595− else step' (rstState gst) s
595+ else step' gst s
596596 Stop -> return $ Stop
597597
598598{-# INLINE filter #-}