@@ -141,11 +141,10 @@ where
141#include "inline.hs"
141#include "inline.hs"
143import Streamly.Internal.Data.Stream.Bottom
143import Streamly.Internal.Data.Stream.Bottom
144− ( concatEffect, concatMapM, concatMap, smapM, fromPure
144+ ( concatEffect, concatMapM, concatMap, smapM, zipWith, zipWithM)
145− , zipWith, zipWithM)
146import Streamly.Internal.Data.Stream.Type
145import Streamly.Internal.Data.Stream.Type
147 ( Stream, fromStreamD, fromStreamK, toStreamD, toStreamK
146 ( Stream, fromStreamD, fromStreamK, toStreamD, toStreamK
148− , bindWith, concatMapWith, nil)
147+ , bindWith, concatMapWith, cons, nil)
149import Streamly.Internal.Data.Unfold.Type (Unfold)
148import Streamly.Internal.Data.Unfold.Type (Unfold)
151import qualified Streamly.Internal.Data.Stream.StreamD as D
150import qualified Streamly.Internal.Data.Stream.StreamD as D
@@ -674,7 +673,7 @@ iterateConcatMapWith combine f = iterateStream
675 iterateStream = concatMapWith combine generate
674 iterateStream = concatMapWith combine generate
677− generate x = fromPure x `combine` iterateStream (f x)
676+ generate x = x `cons` iterateStream (f x)
679-- | Traverse the stream in depth first style (DFS). Map each element in the
678-- | Traverse the stream in depth first style (DFS). Map each element in the
680-- input stream to a stream and flatten, recursively map the resulting elements
679-- input stream to a stream and flatten, recursively map the resulting elements
@@ -758,7 +757,7 @@ iterateMergeMapWith combine f = iterateStream
759 iterateStream = mergeMapWith combine generate
758 iterateStream = mergeMapWith combine generate
761− generate x = fromPure x `combine` iterateStream (f x)
760+ generate x = x `cons` iterateStream (f x)
763-- | Same as @iterateConcatMapDFS@ but more efficient due to stream fusion.
762-- | Same as @iterateConcatMapDFS@ but more efficient due to stream fusion.
@@ -825,7 +824,7 @@ iterateConcatScanWith combine f initial stream =
826 iterateStream (b, s) = pure $ concatMapWith combine (generate b) s
825 iterateStream (b, s) = pure $ concatMapWith combine (generate b) s
828− generate b a = fromPure a `combine` feedback b a
827+ generate b a = a `cons` feedback b a
830 feedback b a = concatEffect $ f b a >>= iterateStream
829 feedback b a = concatEffect $ f b a >>= iterateStream