bluefin-0.7.0.0: src/Bluefin/Stream.hs
-- | This is an old interface and will be deprecated in the
-- future. You are encouraged to use "Bluefin.Capability.Yield"
-- instead.
module Bluefin.Stream
( -- | 'Stream' allows you to yield values during the execution of a
-- Bluefin operation. It provides similar functionality to
-- Python's @yield@. The handler of the 'Stream' will either
-- handle each element as soon as it is yielded (for example
-- 'forEach') or gather all yielded elements into a list (for
-- example 'yieldToList').
--
-- For information about prompt finalization/resource safety when
-- using Bluefin @Stream@s, see "Bluefin.Coroutine".
-- * Handle
Stream,
-- * Handlers
forEach,
yieldToList,
yieldToReverseList,
withYieldToList,
ignoreStream,
enumerate,
enumerateFrom,
mapMaybe,
catMaybes,
consumeStream,
streamConsume,
-- * Effectful operations
yield,
inFoldable,
cycleToStream,
takeConsume,
)
where
import Bluefin.Internal