Packages

  • package root
    Definition Classes
    root
  • package h8io
    Definition Classes
    root
  • package stages
    Definition Classes
    h8io
  • package base

    Type aliases used throughout the lib module for describing stage transformations.

    Type aliases used throughout the lib module for describing stage transformations.

    // A decorator is a stage itself: it wraps a Stage[I, O, E] and is one:
    val myDecorator: Decorator[String, Int, Nothing] = CompleteIfNone(stage)
    
    // A decoration is the function building it; an alteration is the same with the types free to change:
    val myDecoration: Decoration[String, Int, Nothing] = CompleteIfNone(_)
    val myAlteration: Alteration[Stage[String, Int, Nothing], Stage[String, Option[Int], Nothing]] = Lift(_)
    Definition Classes
    stages
  • object BaseBinaryOperator

    Companion object for BaseBinaryOperator.

    Companion object for BaseBinaryOperator.

    Definition Classes
    base
  • Evolution

trait Evolution[-I, LO, RO, +O, +E] extends stages.Evolution[I, O, E]

The continuation of a BaseBinaryOperator: a pair of sub-evolutions that evolve and dispose together.

Concrete operators implement apply alone — the reassembly of the two continuations into the operator's own shape — and inherit the two halves of the shared contract:

  • evolve selects both continuations on the same status, the right one first, and hands them to apply;
  • dispose releases both through h8io.stages.Evolution.dispose, right first, so that a failure of one still leaves the other released and is reported as suppressed.
I

the shared input type (contravariant)

LO

the left output type (invariant: consumed and produced by the sub-evolution)

RO

the right output type (invariant, likewise)

O

the combined output type (covariant)

E

the shared error type (covariant)

Linear Supertypes
stages.Evolution[I, O, E], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Evolution
  2. Evolution
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply[_I <: I, _E >: E](leftStage: Stage[_I, LO, _E], rightStage: Stage[_I, RO, _E]): Stage[_I, O, _E]

    Rebuilds the operator from the two continuations — normally the operator's own constructor.

    Rebuilds the operator from the two continuations — normally the operator's own constructor.

    leftStage

    the stage the left sub-evolution selected

    rightStage

    the stage the right sub-evolution selected

    Attributes
    protected
  2. abstract def left: stages.Evolution[I, LO, E]

    The continuation of the left sub-stage.

  3. abstract def right: stages.Evolution[I, RO, E]

    The continuation of the right sub-stage.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  6. final def compose[_O, _E >: E](that: stages.Evolution[O, _O, _E]): stages.Evolution[I, _O, _E]

    Composes this evolution with the one downstream of it, so that for every status

    Composes this evolution with the one downstream of it, so that for every status

    composed(s) == self(s) ~> that(s)

    This is how Yield composition carries both continuations of a pipeline forward; application code rarely calls it directly.

    Definition Classes
    Evolution
    Annotations
    @inline()
  7. def dispose(): Unit

    Releases everything held by the Stage that produced this evolution.

    Releases everything held by the Stage that produced this evolution. That stage is permanently unusable afterwards — neither applied nor skipped again — and this is the only place its resources are released.

    Whoever terminates a pipeline is responsible for disposing the evolution of the final Yield, so that the continuation is released at once instead of being carried around. The reference terminal driver is the execute extension method of h8io.stages.base in the lib module.

    dispose() stays valid after evolve has been called on the same instance, and must then release everything still alive, including whatever building the continuation acquired. evolve hands over no ownership: this evolution remains the cleanup point for its lineage until the continuation has run and produced an evolution of its own, which takes the role over from that moment.

    Exceptions are not part of this contract: a stage whose apply throws produces no yield and therefore no evolution, so there is nothing to dispose — it must clean up after itself (see the Lifecycle section in Stage).

    A no-op is a fine implementation for a stage holding nothing external.

    Definition Classes
    Evolution → Evolution
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def evolve(status: Status[_]): Stage[I, O, E]

    The next stage, for the given status.

    The next stage, for the given status.

    May release what belongs to this generation alone — anything the returned stage and its own evolution will not reuse.

    evolve and dispose are not mutually exclusive. Usually only one of them is called on an instance: a terminal driver disposes, a continuing pipeline evolves and drops the previous evolution. But a caller may do both, and operators owning their inner stage (Loop, Repeat and the rest of h8io.stages.cycles in the lib module) do exactly that — they evolve eagerly and keep the inner dispose as the cleanup handle of the generation they just built.

    Definition Classes
    Evolution → Evolution
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def map[_I, _O, _E](f: (Stage[I, O, E]) ⇒ Stage[_I, _O, _E]): stages.Evolution[_I, _O, _E]

    Applies f to every stage this evolution would return, leaving disposal delegated to it unchanged.

    Applies f to every stage this evolution would return, leaving disposal delegated to it unchanged.

    The way an operator keeps its wrapping in place across generations: the continuation comes back wrapped the same way the current stage is.

    Definition Classes
    Evolution
    Annotations
    @inline()
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from stages.Evolution[I, O, E]

Inherited from AnyRef

Inherited from Any

Ungrouped