Alternative

turbolift.effects.Alternative
case object Alternative extends ChoiceSignature

Virtual instance of ChoiceEffect

Allows invoking operations of ChoiceEffect, without the need of knowing its concrete instance. Alternative is designed to "match" the nearest (innermost) instance of ChoiceEffect currently present in the effect stack.

This is needed for making the following mechanisms to work:

  • Guards in for comprehensions use Alternative.empty
  • Binary operators +! and ++! (similar to <+> from Cats) use plus and plusPar.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Signature
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Types

override type ThisEffect >: ChoiceSignature

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

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton

Inherited and Abstract types

type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

override def choose[A](as: Iterable[A]): Computation[A, ThisEffect]

Attributes

Definition Classes
override def choosePar[A](as: Iterable[A]): Computation[A, ThisEffect]

Attributes

Definition Classes
def plus[A, U <: ThisEffect](lhs: Computation[A, U], rhs: => Computation[A, U]): Computation[A, U]
def plusPar[A, U <: ThisEffect](lhs: Computation[A, U], rhs: Computation[A, U]): Computation[A, U]

Inherited methods

def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

override val empty: Computation[Nothing, ThisEffect]