interpret

org.specs2.control.eff.`package`.interpret
object interpret extends Interpret

Attributes

Graph
Supertypes
trait Interpret
class Object
trait Matchable
class Any
Self type
interpret.type

Members list

Type members

Inherited classlikes

trait StateRecurse[M[_], A, B]

Helper trait for computations which might produce several M[X] in a stack of effects and which need to keep some state around

Helper trait for computations which might produce several M[X] in a stack of effects and which need to keep some state around

This is typically the case for Writer or State which need to keep some state S after each evaluation Evaluating the effect M[X] might use the previous S value as shown in the apply method

Finally when the Eff[R, A] returns an A, this one can be combined with the last state value to produce a B

Attributes

Inherited from:
Interpret
Supertypes
class Object
trait Matchable
class Any

Inherited types

type of[F[_], G[_]] = { type l = [A] =>> F[G[A]]; }

Attributes

Inherited from:
Interpret

Value members

Inherited methods

def augment[R, T[_], O[_], A](eff: Eff[R, A])(w: Augment[T, O])(implicit m: MemberInOut[T, R]): Eff[prepend[O, R], A]

Attributes

Inherited from:
Interpret
def intercept[R, M[_], A, B](pure: A => Eff[R, B], recurse: Recurse[M, R, B])(effects: Eff[R, A])(implicit m: MemberInOut[M, R]): Eff[R, B]

INTERPRET IN THE SAME STACK

INTERPRET IN THE SAME STACK

Attributes

Inherited from:
Interpret
def intercept1[R, M[_], A, B](pure: A => B)(recurse: Recurse[M, R, B])(effects: Eff[R, A])(implicit m: MemberInOut[M, R]): Eff[R, B]

simpler version of intercept where the pure value is just mapped to another type

simpler version of intercept where the pure value is just mapped to another type

Attributes

Inherited from:
Interpret
def interceptLoop[R, M[_], A, B](pure: A => Eff[R, B], loop: Loop[M, R, A, Eff[R, B], Eff[R, Unit]])(effects: Eff[R, A])(implicit m: MemberInOut[M, R]): Eff[R, B]

intercept an effect and interpret it in the same stack. This method is stack-safe

intercept an effect and interpret it in the same stack. This method is stack-safe

Attributes

Inherited from:
Interpret
def interceptLoop1[R, M[_], A, B](pure: A => B)(loop: Loop[M, R, A, Eff[R, B], Eff[R, Unit]])(effects: Eff[R, A])(implicit m: MemberInOut[M, R]): Eff[R, B]

Attributes

Inherited from:
Interpret
def interceptNat[R, T[_], A](effects: Eff[R, A])(nat: NaturalTransformation[T, T])(implicit m: MemberInOut[T, R]): Eff[R, A]

Intercept the values for one effect and transform them into other values for the same effect

Intercept the values for one effect and transform them into other values for the same effect

Attributes

Inherited from:
Interpret
def interceptNatM[R, T[_], F[_], A](effects: Eff[R, A], nat: NaturalTransformation[T, <none>])(implicit m: MemberInOut[T, R], FT: Traverse[F], FM: Monad[F]): Eff[R, F[A]]

Intercept the values for one effect, emitting new values for the same effect inside a monad which is interleaved in

Intercept the values for one effect, emitting new values for the same effect inside a monad which is interleaved in

Attributes

Inherited from:
Interpret
def interceptStatelessLoop[R, M[_], A, B](pure: A => Eff[R, B], loop: StatelessLoop[M, R, A, Eff[R, B], Eff[R, Unit]])(effects: Eff[R, A])(implicit m: MemberInOut[M, R]): Eff[R, B]

Attributes

Inherited from:
Interpret
def interceptStatelessLoop1[R, M[_], A, B](pure: A => B)(loop: StatelessLoop[M, R, A, Eff[R, B], Eff[R, Unit]])(effects: Eff[R, A])(implicit m: MemberInOut[M, R]): Eff[R, B]

Attributes

Inherited from:
Interpret
def interpret[R, U, M[_], A, B](pure: A => Eff[U, B], recurse: Recurse[M, U, B])(effects: Eff[R, A])(implicit m: Aux[M, R, U]): Eff[U, B]

interpret the effect M in the R stack

interpret the effect M in the R stack

Attributes

Inherited from:
Interpret
def interpret1[R, U, M[_], A, B](pure: A => B)(recurse: Recurse[M, U, B])(effects: Eff[R, A])(implicit m: Aux[M, R, U]): Eff[U, B]

simpler version of interpret where the pure value is just mapped to another type

simpler version of interpret where the pure value is just mapped to another type

Attributes

Inherited from:
Interpret
def interpretLoop[R, U, M[_], A, B](pure: A => Eff[U, B], loop: Loop[M, R, A, Eff[U, B], Eff[U, Unit]])(effects: Eff[R, A])(implicit m: Aux[M, R, U]): Eff[U, B]

generalization of interpret and interpretState

generalization of interpret and interpretState

This method contains a loop which is stack-safe

Attributes

Inherited from:
Interpret
def interpretLoop1[R, U, M[_], A, B](pure: A => B)(loop: Loop[M, R, A, Eff[U, B], Eff[U, Unit]])(effects: Eff[R, A])(implicit m: Aux[M, R, U]): Eff[U, B]

Attributes

Inherited from:
Interpret
def interpretState[R, U, M[_], A, B](pure: A => Eff[U, B], recurse: StateRecurse[M, A, B])(effects: Eff[R, A])(implicit m: Aux[M, R, U]): Eff[U, B]

interpret the effect M in the M |: R stack, keeping track of some state

interpret the effect M in the M |: R stack, keeping track of some state

Attributes

Inherited from:
Interpret
def interpretState1[R, U, M[_], A, B](pure: A => B)(recurse: StateRecurse[M, A, B])(effects: Eff[R, A])(implicit m: Aux[M, R, U]): Eff[U, B]

simpler version of interpret1 where the pure value is just mapped to another type

simpler version of interpret1 where the pure value is just mapped to another type

Attributes

Inherited from:
Interpret
def interpretStatelessLoop[R, U, M[_], A, B](pure: A => Eff[U, B], loop: StatelessLoop[M, R, A, Eff[U, B], Eff[U, Unit]])(effects: Eff[R, A])(implicit m: Aux[M, R, U]): Eff[U, B]

generalization of interpret

generalization of interpret

This method contains a loop which is stack-safe

Attributes

Inherited from:
Interpret
def interpretStatelessLoop1[R, U, M[_], A, B](pure: A => B)(loop: StatelessLoop[M, R, A, Eff[U, B], Eff[U, Unit]])(effects: Eff[R, A])(implicit m: Aux[M, R, U]): Eff[U, B]

Attributes

Inherited from:
Interpret
def interpretUnsafe[R, U, T[_], A](effects: Eff[R, A])(sideEffect: SideEffect[T])(implicit m: Aux[T, R, U]): Eff[U, A]

interpret an effect by running side-effects

interpret an effect by running side-effects

Attributes

Inherited from:
Interpret
def transform[SR, BR, U, TS[_], TB[_], A](r: Eff[SR, A], nat: NaturalTransformation[TS, TB])(implicit sr: Aux[TS, SR, U], br: Aux[TB, BR, U]): Eff[BR, A]

transform an effect into another one using a natural transformation, leaving the rest of the stack untouched

transform an effect into another one using a natural transformation, leaving the rest of the stack untouched

Attributes

Inherited from:
Interpret
def translate[R, U, T[_], A](effects: Eff[R, A])(tr: Translate[T, U])(implicit m: Aux[T, R, U]): Eff[U, A]

Translate one effect of the stack into some of the other effects in the stack

Translate one effect of the stack into some of the other effects in the stack

Attributes

Inherited from:
Interpret
def translateInto[R, T[_], U, A](eff: Eff[R, A])(translate: Translate[T, U])(implicit m: MemberInOut[T, R], into: IntoPoly[R, U]): Eff[U, A]

Translate one effect of the stack into other effects in a larger stack

Translate one effect of the stack into other effects in a larger stack

Attributes

Inherited from:
Interpret
def translateNat[R, U, T[_], A](effects: Eff[R, A])(nat: NaturalTransformation[T, [_] =>> Eff[U, _$43]])(implicit m: Aux[T, R, U]): Eff[U, A]

Translate one effect of the stack into some of the other effects in the stack Using a natural transformation

Translate one effect of the stack into some of the other effects in the stack Using a natural transformation

Attributes

Inherited from:
Interpret