diff --git a/core/src/Streamly/Internal/Data/Stream/Exception.hs b/core/src/Streamly/Internal/Data/Stream/Exception.hs index 6f45c758d4..c8c20d955c 100644 --- a/core/src/Streamly/Internal/Data/Stream/Exception.hs +++ b/core/src/Streamly/Internal/Data/Stream/Exception.hs @@ -180,7 +180,6 @@ gbracket bef aft onExc onGC ftry action = -- -- Same as the following but more efficient due to fusion: -- --- >>> before action xs = Stream.nilM action <> xs -- >>> before action xs = Stream.concatMap (const xs) (Stream.fromEffect action) -- {-# INLINE_NORMAL before #-} diff --git a/core/src/Streamly/Internal/Data/Stream/Type.hs b/core/src/Streamly/Internal/Data/Stream/Type.hs index 0f8c4816fa..c63a722b7e 100644 --- a/core/src/Streamly/Internal/Data/Stream/Type.hs +++ b/core/src/Streamly/Internal/Data/Stream/Type.hs @@ -225,6 +225,7 @@ pattern Stream step state <- (unShare -> UnStream step state) -- | A stream that terminates without producing any output, but produces a side -- effect. -- +-- >>> nilM action = Stream.before action Stream.nil -- >>> Stream.fold Fold.toList (Stream.nilM (print "nil")) -- "nil" -- []