The Append constructor instructs the driver to continue with
evaluation of first step found in tail Vector.
The Await constructor instructs the driver to evaluate
req.
Continuation of the process.
The Emit constructor instructs the driver to emit
the given sequence of values to the output
and then halt execution with supplied reason.
Marker trait representing process in Emit or Await state.
Provides infix syntax for eval: Process[F,F[O]] => Process[F,O]
The Halt constructor instructs the driver
that the last evaluation of Process completed with
supplied cause.
Tags a state of process that has no appended tail, tha means can be Halt, Emit or Await
Marker trait representing next step of process or terminated process in Halt
This class provides infix syntax specific to Process0.
Syntax for processes that have its effects wrapped in Task
Intermediate step of process.
Alias for emitAll
Await the given F request and use its result.
Await the given F request and use its result.
If you need to specify fallback, use awaitOr
The Process1 which awaits a single input, emits it, then halts normally.
Like await1, but consults fb when await fails to receive an I
Writer based version of await1.
The Wye which request from both branches concurrently.
Writer based version of awaitBoth.
The Tee which requests from the left branch, emits this value, then halts.
Writer based version of awaitL.
Await a request, and if it fails, use fb to determine the next state.
Await a request, and if it fails, use fb to determine the next state.
Otherwise, use rcv to determine the next state.
The Tee which requests from the right branch, emits this value, then halts.
Writer based version of awaitR.
Resource and preemption safe await constructor.
Resource and preemption safe await constructor.
Use this combinator, when acquiring resources. This build a process that when run
evaluates req, and then runs rcv. Once rcv is completed, fails, or is interrupted, it will run release
When the acquisition (req) is interrupted, neither release or rcv is run, however when the req was interrupted after
resource in req was acquired then, the release is run.
If,the acquisition fails, use bracket(req)(onPreempt)(rcv).onFailure(err => ???) code to recover from the
failure eventually.
The infinite Process, always emits a.
The infinite Process, always emits a.
If for performance reasons it is good to emit a in chunks,
specify size of chunk by chunkSize parameter
The Process which emits the single value given, then halts.
The Process which emits the given sequence of values, then halts.
A Writer which emits one value to the output.
A Writer which writes the given value.
Alias for halt.
Alias for await(fo)(emit)
Evaluate an arbitrary effect once, purely for its effects, ignoring its return value.
Evaluate an arbitrary effect once, purely for its effects,
ignoring its return value. This Process emits no values.
The Process which emits no values and halts immediately with the given exception.
A Process which emits n repetitions of a.
Produce a continuous stream from a discrete stream by using the most recent value.
The Process which emits no values and signals normal termination.
An infinite Process that repeatedly applies a given function
to a start value.
An infinite Process that repeatedly applies a given function
to a start value. start is the first value emitted, followed
by f(start), then f(f(start)), and so on.
Like iterate, but takes an effectful function for producing the next state.
Like iterate, but takes an effectful function for producing
the next state. start is the first value emitted.
Lazily produce the range [start, stopExclusive).
Lazily produce the range [start, stopExclusive). If you want to produce the sequence in one chunk, instead of lazily, use emitAll(start until stopExclusive).
Lazily produce a sequence of nonoverlapping ranges, where each range
contains size integers, assuming the upper bound is exclusive.
Lazily produce a sequence of nonoverlapping ranges, where each range
contains size integers, assuming the upper bound is exclusive.
Example: ranges(0, 1000, 10) results in the pairs
(0, 10), (10, 20), (20, 30) ... (990, 1000)
Note: The last emitted range may be truncated at stopExclusive. For
instance, ranges(0,5,4) results in (0,4), (4,5).
if size <= 0
The Process1 which awaits a single input and passes it to rcv to
determine the next state.
Like receive1, but consults fb when it fails to receive an input.
Prefix syntax for p.repeat.
Evaluate an arbitrary effect in a Process.
Evaluate an arbitrary effect in a Process. The resulting Process will emit values
until an error occurs.
Delay running p until awaken becomes true for the first time.
Delay running p until awaken becomes true for the first time.
The awaken process may be discrete.
A supply of Long values, starting with initial.
A supply of Long values, starting with initial.
Each read is guaranteed to return a value which is unique
across all threads reading from this supply.
Produce p lazily.
Produce p lazily. Useful if producing the process involves allocation of
some local mutable resource we want to ensure is freshly allocated
for each consumer of p.
Note that this implementation assures that:
suspend(p).kill === suspend(p.kill) suspend(p).kill === p.kill suspend(p).repeat === suspend(p.repeat) suspend(p).repeat === p.repeat suspend(p).eval === suspend(p.eval) suspend(p).eval === p.eval Halt(cause) ++ suspend(p) === Halt(cause) ++ p
A Writer which writes the given value; alias for emitW.
Adds syntax for Channel.
Adds syntax for Process1.
Adds syntax for Sink.
Adds syntax for Sink that is specialized for Task.
Adds syntax for Tee.
Adds syntax for Writer.
Adds syntax for Writer that is specialized for Task.
Adds syntax for Wye.
Produce a (potentially infinite) source from an unfold.
Like unfold, but takes an effectful function.