Control

turbolift.internals.interpreter.Control
abstract class Control[-A, B, S, F[_], U, V] extends A => Computation[F[B], V]

Delimited continuation.

Accessed from implementations of user-defined Flow interpreters.

Attributes

Graph
Supertypes
trait A => Computation[F[B], V]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def get: S

Current state of the effect.

Current state of the effect.

For stateless interpreters, this is always equal Void.

Attributes

Concrete methods

final override def apply(a: A): Computation[F[B], V]

Alias for unary resume.

Alias for unary resume.

Attributes

Definition Classes
Function1
final def apply(a: A, s: S): Computation[F[B], V]

Alias for binary resume.

Alias for binary resume.

Attributes

final def local[X](body: Computation[X, U]): Computation[(F[X], This), V]

Handles given computation locally.

Handles given computation locally.

Aside from the result of handling, a fresh Control object is returned. Subsequent resuming of this continuation, instead of the fresh one, may undo actions that have been performed by other effects inside the body.

Attributes

final def local[X](body: Computation[X, U], s: S): Computation[(F[X], This), V]

Like the unary local, but also with updating the state.

Like the unary local, but also with updating the state.

Attributes

final def resume(a: A): Computation[F[B], V]

Resumes the continuation.

Resumes the continuation.

Attributes

final def resume(a: A, s: S): Computation[F[B], V]

Like the unary resume, but also with updating the state.

Like the unary resume, but also with updating the state.

Attributes

Inherited methods

def andThen[A](g: Computation[F[B], V] => A): T1 => A

Attributes

Inherited from:
Function1
def compose[A](g: A => A): A => R

Attributes

Inherited from:
Function1
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1