Interpreter

turbolift.interpreter.Interpreter
See theInterpreter companion object
sealed trait Interpreter extends Signature

Super trait for any user-defined Interpreter.

  1. Interpreters are not meant to be created directly. Instead, one of abstract interpreters, provided by Effect, should be inherited:
  1. Interpreters are not meant to be used directly. Instead, a Handler should be created from the interpreter, by calling toHandler method on it.

Attributes

Companion
object
Graph
Supertypes
trait Signature
class Object
trait Matchable
class Any
Known subtypes
class Proxy[Fx]
class Proxy[Fx]
class Stateful[F, G, Fx]
class Stateful[F, G, Fx]
class Stateless[F, G, Fx]
class Stateless[F, G, Fx]
Show all

Members list

Type members

Types

type Elim

Set of effects eliminated from computation by this interpreter.

Set of effects eliminated from computation by this interpreter.

Attributes

type From[+A]

Input of this interpreter.

Input of this interpreter.

Attributes

type Intro

Set of effects introduced into computation by this interpreter (a.k.a. dependencies).

Set of effects introduced into computation by this interpreter (a.k.a. dependencies).

Attributes

type Local

Local state of this interpreter.

Local state of this interpreter.

Attributes

final override type ThisEffect = Elim & Intro

Self-reference to the effect being described by this Signature.

Self-reference to the effect being described by this Signature.

Becomes an alias of this.type, once the signature is inherited from Effect.

Attributes

final type ThisHandler = Handler[From, To, Elim, Intro]

Alias for Handler, specialized for this interperter.

Alias for Handler, specialized for this interperter.

Attributes

type To[+A]

Output of this interpreter.

Output of this interpreter.

Attributes

type Unknown

Phantom type meaning the unknown part of the continuation's answer type.

Phantom type meaning the unknown part of the continuation's answer type.

Full answer type is To[Unknown] !! Intro. The To[+_] part is known to this interpreter. The Unknown part however, is not. It's specific to place(s) where the handler (obtained from this interpreter) would be applied.

Attributes

Value members

Abstract methods

def onFork(s: Local): (Local, Local)
def onJoin(s1: Local, s2: Local): Local
def onZip[A, B, C](aa: To[A], bb: To[B], k: (A, B) => C): To[C]

Concrete methods

final inline def hasForkJoin: Boolean
final inline def hasRestart: Boolean
final inline def hasZip: Boolean
final inline def isIo: Boolean
final inline def isParallel: Boolean
final inline def isStateful: Boolean
final inline def isStateless: Boolean
final inline def localCount: Int
final inline def prompt: Prompt
final def toHandler: ThisHandler

Creates a Handler from this interpreter.

Creates a Handler from this interpreter.

Attributes

Concrete fields

An instance of Control dedicated for this interpreter.

An instance of Control dedicated for this interpreter.

Attributes

An instance of Local dedicated for this interpreter.

An instance of Local dedicated for this interpreter.

Attributes