@@ -273,7 +273,7 @@ import qualified Control.Monad.Catch as MC
273273import Streamly.Mem.Array.Types (Array(..))
274274import Streamly.Fold.Types (Fold(..))
275275import Streamly.Pipe.Types (Pipe(..), PipeState(..))
276−import Streamly.SVar (MonadAsync, defState, adaptState)
276+import Streamly.SVar (MonadAsync, defState, adaptState, State)
277277
278278import Streamly.Streams.StreamD.Type
279279
@@ -366,10 +366,11 @@ repeat :: Monad m => a -> Stream m a
366366repeat x = Stream (\_ _ -> return $ Yield x ()) ()
367367
368368{-# 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
370370replicateM n p = Stream step n
371371 where
372372 {-# INLINE_LATE step #-}
373+ step :: State K.Stream m a -> Int -> m (Step Int a)
373374 step _ i | i <= 0 = return Stop
374375 | otherwise = do
375376 x <- p