@@ -159,7 +159,7 @@ import Streamly.Internal.Data.IOFinalizer
159159 (newIOFinalizer, runIOFinalizer, clearingIOFinalizer)
160160import Streamly.Internal.Data.Stream.StreamD.Type (Stream(..), Step(..))
161161import Streamly.Internal.Data.Time.Clock (Clock(Monotonic), getTime)
162−import Streamly.Internal.Data.Unfold.Types (Unfold(..), lmap)
162+import Streamly.Internal.Data.Unfold.Types (Unfold(..), lmap, map)
163163import System.Mem (performMajorGC)
164164
165165import qualified Prelude
@@ -288,18 +288,6 @@ fold (Unfold ustep inject) (Fold fstep initial extract) a = do
288288 Skip s -> go SPEC fs s
289289 Stop -> extract fs
290290
291−{-# INLINE_NORMAL map #-}
292−map :: Monad m => (b -> c) -> Unfold m a b -> Unfold m a c
293−map f (Unfold ustep uinject) = Unfold step uinject
294− where
295− {-# INLINE_LATE step #-}
296− step st = do
297− r <- ustep st
298− return $ case r of
299− Yield x s -> Yield (f x) s
300− Skip s -> Skip s
301− Stop -> Stop
302−
303291{-# INLINE_NORMAL mapM #-}
304292mapM :: Monad m => (b -> m c) -> Unfold m a b -> Unfold m a c
305293mapM f (Unfold ustep uinject) = Unfold step uinject