The Append constructor instructs the driver to continue with
evaluation of first step found in tail Vector.
The Append constructor instructs the driver to continue with
evaluation of first step found in tail Vector.
Instead of this constructor please use:
Process.append
The Await constructor instructs the driver to evaluate
req.
The Await constructor instructs the driver to evaluate
req. If it returns successfully, recv is called with result on right side
to transition to the next state.
In case the req terminates with failure the Error(failure) is passed on left side
giving chance for any fallback action.
In case the process was killed before the request is evaluated Kill is passed on left side.
Kill is passed on left side as well as when the request is already in progress, but process was killed.
Note that
Instead of this constructor directly, please use:
Process.await
Adds syntax for Channel.
Continuation of the process.
Continuation of the process. Represents process _stack_. Used in conjunction with Step.
The Emit constructor instructs the driver to emit
the given sequence of values to the output
and then halt execution with supplied reason.
The Emit constructor instructs the driver to emit
the given sequence of values to the output
and then halt execution with supplied reason.
Instead calling this constructor directly, please use one of the following helpers:
Process.emit Process.emitAll
Marker trait representing process in Emit or Await state.
Marker trait representing process in Emit or Await state. Is useful for more type safety.
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.
This class provides infix syntax specific to Process1.
Adds syntax for Sink.
Syntax for Sink, that is specialized for Task
Syntax for processes that have its effects wrapped in Task
Intermediate step of process.
Intermediate step of process. Used to step within the process to define complex combinators.
This class provides infix syntax specific to Tee.
This class provides infix syntax specific to Tee. We put these here
rather than trying to cram them into Process itself using implicit
equality witnesses. This doesn't work out so well due to variance
issues.
Infix syntax for working with Writer[F,W,O].
Infix syntax for working with Writer[F,W,O]. We call
the W parameter the 'write' side of the Writer and
O the 'output' side. Many method in this class end
with either W or O, depending on what side they
operate on.
This class provides infix syntax specific to Wye.
This class provides infix syntax specific to Wye. We put these here
rather than trying to cram them into Process itself using implicit
equality witnesses. This doesn't work out so well due to variance
issues.
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.
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.
Evaluate an arbitrary effect in a Process.
Evaluate an arbitrary effect in a Process. The resulting
Process emits a single value. To evaluate repeatedly, use
repeatEval(t).
Do not use eval.repeat or repeat(eval) as that may cause infinite loop in certain situations.
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).
IllegalArgumentException 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 evaluation of f signals termination with End or an error occurs.
Note that if f results to failure of type Terminated the repeatEval will convert cause
to respective process cause termination, and will halt with that cause.
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.
Produce a (potentially infinite) source from an unfold.
Like unfold, but takes an effectful function.