on master help sign in
Stricitify index i in `findIndices`.
commit8642922d9da6eb2afc7da583d1833bf19d8ce086 authorPranay Sashank <pranaysashank@gmail.com> dateWed 20 Nov 2019, 18:40 (7 years ago) parenta97e3f3
1 file changed+1−1
src/Streamly/Streams/StreamD.hs+1−1
src/Streamly/Streams/StreamD.hs+1−1
@@ -956,7 +956,7 @@ findIndices :: Monad m => (a -> Bool) -> Stream m a -> Stream m Int
956956findIndices p (Stream step state) = Stream step' (state, 0)
957957 where
958958 {-# INLINE_LATE step' #-}
959− step' gst (st, i) = do
959+ step' gst (st, i) = i `seq` do
960960 r <- step (adaptState gst) st
961961 return $ case r of
962962 Yield x s -> if p x then Yield i (s, i+1) else Skip (s, i+1)