@@ -273,7 +273,7 @@ import qualified Control.Monad.Catch as MC
273import Streamly.Mem.Array.Types (Array(..))
273import Streamly.Mem.Array.Types (Array(..))
274import Streamly.Fold.Types (Fold(..))
274import Streamly.Fold.Types (Fold(..))
275import Streamly.Pipe.Types (Pipe(..), PipeState(..))
275import Streamly.Pipe.Types (Pipe(..), PipeState(..))
276−import Streamly.SVar (MonadAsync, defState, adaptState)
276+import Streamly.SVar (MonadAsync, defState, adaptState, State)
278import Streamly.Streams.StreamD.Type
278import Streamly.Streams.StreamD.Type
@@ -366,10 +366,11 @@ repeat :: Monad m => a -> Stream m a
366repeat x = Stream (\_ _ -> return $ Yield x ()) ()
366repeat x = Stream (\_ _ -> return $ Yield x ()) ()
368{-# INLINE_NORMAL replicateM #-}
368{-# INLINE_NORMAL replicateM #-}
369−replicateM :: Monad m => Int -> m a -> Stream m a
369+replicateM :: forall m a. Monad m => Int -> m a -> Stream m a
370replicateM n p = Stream step n
370replicateM n p = Stream step n
372 {-# INLINE_LATE step #-}
372 {-# INLINE_LATE step #-}
373+ step :: State K.Stream m a -> Int -> m (Step Int a)
373 step _ i | i <= 0 = return Stop
374 step _ i | i <= 0 = return Stop
374 | otherwise = do
375 | otherwise = do