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 FromConst[C, G, Fx]
class Free[C, G]
class ToConst[C, D, Fx]
class Free[C, D]
class FromId[G, Fx]
class Free[G]
class ToConst[D, Fx]
class Free[D]
class ToId[Fx]
class Free
class Stateless[F, G, Fx]
class Stateless[F, G, Fx]
class FromConst[C, G, Fx]
class Free[C, G]
class ToConst[C, D, Fx]
class Free[C, D]
class FromId[G, Fx]
class Free[G]
class ToConst[D, Fx]
class Free[D]
class ToId[Fx]
class Free
Show all

Members list

Type members

Types

type Ambient

Phantom type meaning set of effects remaining after handling this effect.

Phantom type meaning set of effects remaining after handling this effect.

Attributes

final type BinarySem[A, U] = (ThisControl[A, U], Stan) => Computation[To[Unknown], Ambient]
type Dependency

Set of effects that this interpreter depends on.

Set of effects that this interpreter depends on.

Attributes

type From[+A]

Input of this interpreter.

Input of this interpreter.

Attributes

final type NullarySem[A, U] = Computation[A, U & Dependency]
type Stan

State of this interpreter. Named Stan, to avoid confusion with State effect.

State of this interpreter. Named Stan, to avoid confusion with State effect.

Attributes

final type ThisControl[-A, U] = Control[A, Unknown, Stan, To, U & Dependency, Ambient]

Alias for Control, specialized for this interperter.

Alias for Control, specialized for this interperter.

Attributes

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

final type UnarySem[A, U] = ThisControl[A, U] => Computation[To[Unknown], Ambient]
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] !! Ambient. The To[+_] part is known to this interpreter. The Unknown and Ambient parts however, are not. They specific to place(s) where the handler (obtained from this interpreter) would be applied.

Attributes

Inherited types

type !@![A, U]

Abstract type that must be used in definitions of effect's operations.

Abstract type that must be used in definitions of effect's operations.

Becomes an alias of Computation (i.e. same as !!), once the signature is inherited from Effect.

Attributes

Inherited from:
Signature
type ThisEffect

Abstract type that must be used in definitions of effect's operations.

Abstract type that must be used in definitions of effect's operations.

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

Attributes

Inherited from:
Signature

Value members

Abstract methods

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

Concrete methods

def multishotHint: Boolean
def resurceUnsafeHint: Boolean
def tailResumptiveHint: Boolean
final def toHandler: ThisHandler

Creates a Handler from this interpreter.

Creates a Handler from this interpreter.

Attributes

def topmostOnlyHint: Boolean

Concrete fields

final val features: Features