on master help sign in
Fix commented code for drain
2f31747Harendra Kumar
src/Streamly/Streams/StreamD.hs+1−1
@@ -623,7 +623,7 @@ foldlS fstep begin (Stream step state) = Stream step' (Left (state, begin))
623-- | Run a streaming composition, discard the results.
623-- | Run a streaming composition, discard the results.
624{-# INLINE_LATE drain #-}
624{-# INLINE_LATE drain #-}
625drain :: Monad m => Stream m a -> m ()
625drain :: Monad m => Stream m a -> m ()
626−-- drain m = foldrM (\x xs -> x `seq` xs) (return ()) m
626+-- drain = foldrM (\_ xs -> xs) (return ())
627drain (Stream step state) = go SPEC state
627drain (Stream step state) = go SPEC state
628 where
628 where
629 go !_ st = do
629 go !_ st = do