org.specs2.control.eff

Members list

Type members

Classlikes

case class Arrs[R, A, B](functions: Vector[Any => Eff[R, Any]]) extends A => Eff[R, B]

Sequence of monadic functions from A to B: A => Eff[B]

Sequence of monadic functions from A to B: A => Eff[B]

Internally it is represented as a Vector of functions:

A => Eff[R, X1]; X1 => Eff[R, X2]; X2 => Eff[R, X3]; ...; X3 => Eff[R, B]

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait A => Eff[R, B]
class Object
trait Matchable
class Any
Show all
object Arrs

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Arrs.type
trait Augment[T[_], O[_]]

Attributes

Supertypes
class Object
trait Matchable
class Any
case class CollectedUnions[M[_], R, U](effects: List[M[Any]], otherEffects: List[Union[U, Any]], indices: List[Int], otherIndices: List[Int])

Collection of effects of a given type from a Unions objects

Collection of effects of a given type from a Unions objects

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ConsoleEffect

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DisjunctionCreation.type
object DisjunctionEffect.type
object all.type
object create.type
object disjunction.type
Show all

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Effect for computation which can fail

Effect for computation which can fail

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DisjunctionEffect.type
object all.type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DisjunctionEffect.type
object all.type
object disjunction.type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Eff[R, A]

Effects of type R, returning a value of type A

Effects of type R, returning a value of type A

It is implemented as a "Free-er" monad with extensible effects:

  • the "pure" case is a pure value of type A

  • the "impure" case is:

    • a disjoint union of possible effects
    • a continuation of type X => Eff[R, A] indicating what to do if the current effect is of type M[X] this type is represented by the Arrs type
  • the "impure applicative" case is:

    • list of disjoint unions of possible effects
    • a function to apply to the values resulting from those effects

The monad implementation for this type is really simple:

  • point is Pure
  • bind simply appends the binding function to the Arrs continuation

Important:

The list of continuations is NOT implemented as a type sequence but simply as a Vector[Any => Eff[R, Any]]

This means that various .asInstanceOf are present in the implementation and could lead to burns and severe harm. Use with caution!

Similarly the list of effects in the applicative case is untyped and interpreters for those effects are supposed to create a list of values to feed the mapping function. If an interpreter doesn't create a list of values of the right size and with the right types, there will be a runtime exception.

The Pure, Impure and ImpureAp cases also incorporate a "last" action returning no value but just used for side-effects (shutting down an execution context for example). This action is meant to be executed at the end of all computations, regardless of the number of flatMaps added on the Eff value.

Since this last action will be executed, its value never collected so if it throws an exception it is possible to print it by defining the eff.debuglast system property (-Deff.debuglast=true)

Attributes

See also
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Impure[R, X, A]
class ImpureAp[R, X, A]
class Pure[R, A]

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
trait EffImplicits
trait EffCreation
class Object
trait Matchable
class Any
Show all
Self type
Eff.type
trait EffCreation

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Eff.type
object EffCreation.type
object all.type
object create.type
object eff.type
object EffCreation extends EffCreation

Attributes

Companion
trait
Supertypes
trait EffCreation
class Object
trait Matchable
class Any
Self type
trait EffImplicits

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Eff.type
object EffImplicits.type
object all.type
object EffImplicits extends EffImplicits

Attributes

Companion
trait
Supertypes
trait EffImplicits
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Eff.type
object EffInterpretation.type
object all.type
object eff.type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Effect[F[_]]

one effect, basically a type constructor

one effect, basically a type constructor

Attributes

Supertypes
class Object
trait Matchable
class Any
trait ErrorCreation[F] extends ErrorTypes[F]

Attributes

Supertypes
trait ErrorTypes[F]
class Object
trait Matchable
class Any
Known subtypes
trait ErrorEffect[F]
object ErrorEffect.type

Effect for computation which can fail and return a Throwable, or just stop with a failure

Effect for computation which can fail and return a Throwable, or just stop with a failure

This effect is a mix of Eval and Either in the sense that every computation passed to this effect (with the ok method) is considered "impure" or "faulty" by default.

The type F is used to represent the failure type.

Attributes

Companion
object
Supertypes
trait ErrorCreation[F]
trait ErrorTypes[F]
class Object
trait Matchable
class Any
Show all
Known subtypes
object ErrorEffect.type
object ErrorEffect extends ErrorEffect[String]

Simple instantiation of the ErrorEffect trait with String as a Failure type

Simple instantiation of the ErrorEffect trait with String as a Failure type

Attributes

Companion
trait
Supertypes
trait ErrorEffect[String]
trait ErrorInterpretation[String]
trait ErrorCreation[String]
trait ErrorTypes[String]
class Object
trait Matchable
class Any
Show all
Self type
trait ErrorInterpretation[F] extends ErrorCreation[F]

Attributes

Supertypes
trait ErrorCreation[F]
trait ErrorTypes[F]
class Object
trait Matchable
class Any
Known subtypes
trait ErrorEffect[F]
object ErrorEffect.type
Self type
trait ErrorTypes[F]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait ErrorCreation[F]
trait ErrorEffect[F]
object ErrorEffect.type
trait EvalCreation extends EvalTypes

Attributes

Supertypes
trait EvalTypes
class Object
trait Matchable
class Any
Known subtypes
trait EvalEffect
object EvalEffect.type
object all.type
object eval.type
object create.type

Effect for delayed computations

Effect for delayed computations

uses scalaz.Need as a supporting data structure

Attributes

Companion
object
Supertypes
trait EvalCreation
trait EvalTypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object EvalEffect.type
object all.type
object eval.type
object EvalEffect extends EvalEffect

Attributes

Companion
trait
Supertypes
trait EvalEffect
trait EvalCreation
trait EvalTypes
class Object
trait Matchable
class Any
Show all
Self type
EvalEffect.type

Attributes

Companion
object
Supertypes
trait EvalTypes
class Object
trait Matchable
class Any
Known subtypes
trait EvalEffect
object EvalEffect.type
object all.type
object eval.type
object EvalInterpretation.type

Attributes

Companion
trait
Supertypes
trait EvalTypes
class Object
trait Matchable
class Any
Self type
trait EvalTypes

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait EvalCreation
trait EvalEffect
object EvalEffect.type
object all.type
object eval.type
object create.type
object EvalInterpretation.type
object EvalTypes.type
Show all
object EvalTypes extends EvalTypes

Attributes

Companion
trait
Supertypes
trait EvalTypes
class Object
trait Matchable
class Any
Self type
EvalTypes.type
case class Evaluate[F, A](run: Either[Either[Throwable, F], Name[A]])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Evaluate

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Evaluate.type
case class EvaluateValue[A](a: Name[A]) extends Safe[A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Safe[A]
class Object
trait Matchable
class Any
Show all
trait Evaluated[+T]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Memoized[T]
case class FailedFinalizer(t: Throwable) extends Safe[Unit]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Safe[Unit]
class Object
trait Matchable
class Any
Show all
case class FailedValue[A](t: Throwable) extends Safe[A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Safe[A]
class Object
trait Matchable
class Any
Show all

Attributes

Companion
trait
Supertypes
trait FutureTypes
class Object
trait Matchable
class Any
Self type
trait FutureCreation extends FutureTypes

Attributes

Companion
object
Supertypes
trait FutureTypes
class Object
trait Matchable
class Any
Known subtypes
object FutureCreation.type
trait FutureEffect
object FutureEffect.type

Attributes

Companion
object
Supertypes
trait FutureTypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object FutureEffect.type
object FutureEffect extends FutureEffect

Attributes

Companion
trait
Supertypes
trait FutureEffect
trait FutureTypes
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Companion
object
Supertypes
trait FutureTypes
class Object
trait Matchable
class Any
Known subtypes
trait FutureEffect
object FutureEffect.type
object FutureInterpretation.type

Attributes

Companion
trait
Supertypes
trait FutureTypes
class Object
trait Matchable
class Any
Self type
trait FutureTypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object FutureCreation.type
trait FutureEffect
object FutureEffect.type
object FutureInterpretation.type
Show all
sealed trait Fx

Base type for a tree of effect types

Base type for a tree of effect types

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Fx1[F]
class Fx2[L, R]
class Fx3[L, M, R]
class FxAppend[L, R]
class NoFx
object NoFx.type
Show all
object Fx

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Fx.type
final case class Fx1[F[_]](e: Effect[F]) extends Fx

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Fx
class Object
trait Matchable
class Any
Show all
final case class Fx2[L[_], R[_]](left: Effect[L], right: Effect[R]) extends Fx

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Fx
class Object
trait Matchable
class Any
Show all
final case class Fx3[L[_], M[_], R[_]](left: Effect[L], middle: Effect[M], right: Effect[R]) extends Fx

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Fx
class Object
trait Matchable
class Any
Show all
final case class FxAppend[L, R](left: L, right: R) extends Fx

Append a tree of effects to another one

Append a tree of effects to another one

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Fx
class Object
trait Matchable
class Any
Show all
case class Impure[R, X, A](union: Union[R, X], continuation: Arrs[R, X, A], last: Last[R]) extends Eff[R, A]

Impure is an effect (encoded as one possibility among other effects, a Union) and a continuation providing the next Eff value.

Impure is an effect (encoded as one possibility among other effects, a Union) and a continuation providing the next Eff value.

This essentially models a flatMap operation with the current effect and the monadic function to apply to a value once the effect is interpreted

One effect can always be executed last, just for side-effects

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Eff[R, A]
class Object
trait Matchable
class Any
Show all
case class ImpureAp[R, X, A](unions: Unions[R, X], continuation: Arrs[R, List[Any], A], last: Last[R]) extends Eff[R, A]

ImpureAp is a list of independent effects and a pure function creating a value with all the resulting values once all effects have been interpreted.

ImpureAp is a list of independent effects and a pure function creating a value with all the resulting values once all effects have been interpreted.

This essentially models a sequence + map operation but it is important to understand that the list of Union objects can represent different effects and be like: List[Option[Int], Future[String], Option[Int]].

Interpreting such an Eff value for a given effect (say Option) consists in:

  • grouping all the Option values,
  • sequencing them
  • pass them to a continuation which will apply the 'map' functions when the other effects (Future in the example above) will have been interpreted

VERY IMPORTANT:

  • this object is highly unsafe
  • the size of the list argument to 'map' must always be equal to the number of unions in the Unions object
  • the types of the elements in the list argument to 'map' must be the exact types of each effect in unions.unions

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Eff[R, A]
class Object
trait Matchable
class Any
Show all
trait Interpret

Support methods to create interpreters (or "effect handlers") for a given effect M and a value Eff[R, A] when M is a member of R.

Support methods to create interpreters (or "effect handlers") for a given effect M and a value Eff[R, A] when M is a member of R.

Those methods guarantee a stack-safe behaviour when running on a large list of effects (in list.traverse(f) for example).

There are different types of supported interpreters:

  1. "interpret" + Recurse

This interpreter is used to handle effects which either return a value X from M[X] or stops with Eff[R, B] See an example of such an interpreter in Eval where we just evaluate a computation X for each Eval[X].

  1. "interpretState" + StateRecurse

This interpreter is used to handle effects which either return a value X from M[X] or stops with Eff[R, B]

  1. "interpretLoop" + Loop

The most generic kind of interpreter where we can even recurse in the case of Pure(a) (See ListEffect for such a use)

  1. "intercept / interceptState / interceptLoop" methods are similar but they transform an effect to other effects in the same stack without removing it from the stack

  2. "transform" to swap an effect T of a stack to another effect, using a Natural Transformation

  3. "translate" to interpret one effect of a stack into other effects of the same stack using a Natural Transformation this is a specialized version of interpret + Recurse

  4. "interpretUnsafe + SideEffect" when you have a side effecting function M[X] => X

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Interpret.type
object interpret.type
object Interpret extends Interpret

Attributes

Companion
trait
Supertypes
trait Interpret
class Object
trait Matchable
class Any
Self type
Interpret.type
trait IntoPoly[R, U]

Typeclass proving that it is possible to send a tree of effects R into another tree of effects U

Typeclass proving that it is possible to send a tree of effects R into another tree of effects U

for example

sendOption1, Fx.fx3[Option1, Option2, Option3], Int. into[Fx.fx5[Option1, Option2, Option3, Option4, Option5]]

should work because all the effects of the first stack are present in the second

Note: some implicit definitions are probably missing in some cases

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object IntoPoly extends IntoPolyLower1

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Show all
Self type
IntoPoly.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object IntoPoly.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object IntoPoly.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object IntoPoly.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object IntoPoly.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class Last[R](value: Option[Name[Eff[R, Unit]]])

Encapsulation of one optional last action to execute at the end of the program

Encapsulation of one optional last action to execute at the end of the program

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Last

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Last.type
trait Loop[M[_], R, A, B, C]

Generalisation of Recurse and StateRecurse

Generalisation of Recurse and StateRecurse

The loop defines some state with an initial value which is maintained at each step of the interpretation.

A is the type of Eff values to interpret, and B is the result of the interpretation (generally an other Eff value)

C is the type of result for "last" actions.

  • the interpretation of a Pure value either returns the final result or possibly one more Eff value to interpret

  • onEffect interprets one effect and possibly uses the continuation to produce the next value to interpret. If no X can be used to run the continuation we might just output one final B value

  • onLastEffect interprets the last effect of an Eff value. The only difference with onEffect is the fact that last actions return Unit values (and not A values)

  • onApplicativeEff interprets a list of effects and possibly uses the continuation to get to the next value to interpret. If no interpretation can be done, a B value might be returned

  • onLastApplicativeEffect does the same thing for last actions

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Member[T[_], R] extends MemberInOut[T, R]

Attributes

Companion
object
Supertypes
trait MemberInOut[T, R]
trait MemberIn[T, R]
class Object
trait Matchable
class Any
object Member extends MemberLower1

Attributes

Companion
trait
Supertypes
trait MemberLower1
trait MemberLower2
trait MemberLower3
trait MemberLower4
trait MemberLower5
trait MemberLower6
trait MemberLower7
trait MemberLower8
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Self type
Member.type
trait MemberIn[T[_], R]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait MemberInOut[T, R]
trait Member[T, R]
Self type
MemberIn[T, R]
object MemberIn extends MemberInLower1

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Show all
Self type
MemberIn.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object MemberIn.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object MemberIn.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object MemberIn.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object MemberIn.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait MemberInOut[T[_], R] extends MemberIn[T, R]

Attributes

Companion
object
Supertypes
trait MemberIn[T, R]
class Object
trait Matchable
class Any
Known subtypes
trait Member[T, R]
Self type
MemberInOut[T, R]

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object MemberInOut.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object MemberInOut.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait MemberLower1 extends MemberLower2

Attributes

Supertypes
trait MemberLower2
trait MemberLower3
trait MemberLower4
trait MemberLower5
trait MemberLower6
trait MemberLower7
trait MemberLower8
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Known subtypes
object Member.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower9
trait MemberLower8
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower9
trait MemberLower8
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower9
trait MemberLower8
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower9
trait MemberLower8
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower9
trait MemberLower8
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower9
trait MemberLower8
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower9
trait MemberLower8
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait MemberLower2 extends MemberLower3

Attributes

Supertypes
trait MemberLower3
trait MemberLower4
trait MemberLower5
trait MemberLower6
trait MemberLower7
trait MemberLower8
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower1
object Member.type
trait MemberLower3 extends MemberLower4

Attributes

Supertypes
trait MemberLower4
trait MemberLower5
trait MemberLower6
trait MemberLower7
trait MemberLower8
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower2
trait MemberLower1
object Member.type
trait MemberLower4 extends MemberLower5

Attributes

Supertypes
trait MemberLower5
trait MemberLower6
trait MemberLower7
trait MemberLower8
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
trait MemberLower5 extends MemberLower6

Attributes

Supertypes
trait MemberLower6
trait MemberLower7
trait MemberLower8
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
trait MemberLower6 extends MemberLower7

Attributes

Supertypes
trait MemberLower7
trait MemberLower8
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all
trait MemberLower7 extends MemberLower8

Attributes

Supertypes
trait MemberLower8
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all
trait MemberLower8 extends MemberLower9

Attributes

Supertypes
trait MemberLower9
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all
trait MemberLower9 extends MemberLower10

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
trait MemberLower8
trait MemberLower7
trait MemberLower6
trait MemberLower5
trait MemberLower4
trait MemberLower3
trait MemberLower2
trait MemberLower1
object Member.type
Show all
case class Memoized[T](t: () => T) extends Evaluated[T]

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Evaluated[T]
class Object
trait Matchable
class Any
Show all
object Memoized

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Memoized.type
class NoFx extends Fx

The "empty" tree of effects

The "empty" tree of effects

Attributes

Companion
object
Supertypes
trait Fx
class Object
trait Matchable
class Any
Known subtypes
object NoFx.type
object NoFx extends NoFx

Attributes

Companion
class
Supertypes
class NoFx
trait Fx
class Object
trait Matchable
class Any
Self type
NoFx.type
object Now

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Now.type
case class Pure[R, A](value: A, last: Last[R]) extends Eff[R, A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Eff[R, A]
class Object
trait Matchable
class Any
Show all
trait Recurse[M[_], R, A]

Helper trait for computations which might produce several M[X] in a stack of effects.

Helper trait for computations which might produce several M[X] in a stack of effects.

Either we can produce an X to pass to a continuation or we're done

For the applicative case we expect to be able to traverse a list of effects and return an effect of a list of results OR completely consume the effect and return a pure list of values

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait Safe[A]

The Safe type is a mix of a ThrowableEither / Eval effect and a writer effect to collect finalizer failures

The Safe type is a mix of a ThrowableEither / Eval effect and a writer effect to collect finalizer failures

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class EvaluateValue[A]
class FailedValue[A]
trait SafeCreation extends SafeTypes

Attributes

Supertypes
trait SafeTypes
class Object
trait Matchable
class Any
Known subtypes
trait SafeEffect
object SafeEffect.type
object all.type
object SafeInterpretation.type
object safe.type
object create.type
Show all

Attributes

Companion
object
Supertypes
trait SafeCreation
trait SafeTypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object SafeEffect.type
object all.type
object SafeEffect extends SafeEffect

Attributes

Companion
trait
Supertypes
trait SafeEffect
trait SafeCreation
trait SafeTypes
class Object
trait Matchable
class Any
Show all
Self type
SafeEffect.type

Attributes

Companion
object
Supertypes
trait SafeCreation
trait SafeTypes
class Object
trait Matchable
class Any
Known subtypes
trait SafeEffect
object SafeEffect.type
object all.type
object SafeInterpretation.type
object safe.type
Self type

Attributes

Companion
trait
Supertypes
trait SafeCreation
trait SafeTypes
class Object
trait Matchable
class Any
Show all
Self type
trait SafeTypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait SafeCreation
trait SafeEffect
object SafeEffect.type
object all.type
object SafeInterpretation.type
object safe.type
object create.type
Show all
trait SideEffect[T[_]]

Attributes

Supertypes
class Object
trait Matchable
class Any
trait StatelessLoop[M[_], R, A, B, C]

Generalisation of Recurse

Generalisation of Recurse

Attributes

Supertypes
class Object
trait Matchable
class Any
final case class TimedFuture[A](callback: ExecutorServices => Future[A], timeout: Option[FiniteDuration])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TimedFuture

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Translate[T[_], U]

trait for translating one effect into other ones in the same stack

trait for translating one effect into other ones in the same stack

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait Union[+R, A]

Union represents one effect T[_] embedded in a tree of possible effects R

Union represents one effect T[_] embedded in a tree of possible effects R

Since the effect tree is represented with the following cases:

  • Fx1[T]
  • Fx2[T1, T2]
  • Fx3[T1, T2, T3]
  • FxAppend[L, R]

We have the corresponding Union cases. For example T2 is in the "middle" of Fx3[T1, T2, T3] so creating a Union object for that effect uses Union3M

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Union1[T, A]
trait Union2[R, A]
class Union2L[L, R, A]
class Union2R[L, R, A]
trait Union3[R, A]
class Union3L[L, M, R, A]
class Union3M[L, M, R, A]
class Union3R[L, M, R, A]
trait UnionAppend[R, A]
class UnionAppendL[L, R, A]
class UnionAppendR[L, R, A]
Show all
case class Union1[T[_], A](ta: T[A]) extends Union[Fx1[T], A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Union[Fx1[T], A]
class Object
trait Matchable
class Any
Show all
sealed trait Union2[R, A] extends Union[R, A]

Attributes

Supertypes
trait Union[R, A]
class Object
trait Matchable
class Any
Known subtypes
class Union2L[L, R, A]
class Union2R[L, R, A]
case class Union2L[L[_], R[_], A](t: L[A]) extends Union2[Fx2[L, R], A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Union2[Fx2[L, R], A]
trait Union[Fx2[L, R], A]
class Object
trait Matchable
class Any
Show all
case class Union2R[L[_], R[_], A](t: R[A]) extends Union2[Fx2[L, R], A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Union2[Fx2[L, R], A]
trait Union[Fx2[L, R], A]
class Object
trait Matchable
class Any
Show all
sealed trait Union3[R, A] extends Union[R, A]

Attributes

Supertypes
trait Union[R, A]
class Object
trait Matchable
class Any
Known subtypes
class Union3L[L, M, R, A]
class Union3M[L, M, R, A]
class Union3R[L, M, R, A]
case class Union3L[L[_], M[_], R[_], A](t: L[A]) extends Union3[Fx3[L, M, R], A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Union3[Fx3[L, M, R], A]
trait Union[Fx3[L, M, R], A]
class Object
trait Matchable
class Any
Show all
case class Union3M[L[_], M[_], R[_], A](t: M[A]) extends Union3[Fx3[L, M, R], A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Union3[Fx3[L, M, R], A]
trait Union[Fx3[L, M, R], A]
class Object
trait Matchable
class Any
Show all
case class Union3R[L[_], M[_], R[_], A](t: R[A]) extends Union3[Fx3[L, M, R], A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Union3[Fx3[L, M, R], A]
trait Union[Fx3[L, M, R], A]
class Object
trait Matchable
class Any
Show all
sealed trait UnionAppend[R, A] extends Union[R, A]

Attributes

Supertypes
trait Union[R, A]
class Object
trait Matchable
class Any
Known subtypes
class UnionAppendL[L, R, A]
class UnionAppendR[L, R, A]
case class UnionAppendL[L, R, A](t: Union[L, A]) extends UnionAppend[FxAppend[L, R], A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait UnionAppend[FxAppend[L, R], A]
trait Union[FxAppend[L, R], A]
class Object
trait Matchable
class Any
Show all
case class UnionAppendR[L, R, A](t: Union[R, A]) extends UnionAppend[FxAppend[L, R], A]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait UnionAppend[FxAppend[L, R], A]
trait Union[FxAppend[L, R], A]
class Object
trait Matchable
class Any
Show all
trait UnionInto[R, S]

Attributes

Supertypes
class Object
trait Matchable
class Any
case class Unions[R, A](first: Union[R, A], rest: List[Union[R, Any]])

A non-empty list of Unions.

A non-empty list of Unions.

It is only partially typed, we just keep track of the type of the first object

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait Write[T[_], O]

Attributes

Supertypes
class Object
trait Matchable
class Any
case class Writer[O, A](value: O, a: A)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object WriterCreation.type
trait WriterEffect
object WriterEffect.type
object all.type
object create.type
object writer.type
Show all

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Effect for logging values alongside computations

Effect for logging values alongside computations

Compared to traditional Writer monad which accumulates values by default this effect can be interpreted in different ways:

  • log values to the console or to a file as soon as they are produced
  • accumulate values in a list

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object WriterEffect.type
object all.type
object WriterEffect extends WriterEffect

Attributes

Companion
trait
Supertypes
trait WriterEffect
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait WriterEffect
object WriterEffect.type
object all.type
object WriterInterpretation.type
object writer.type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait EffImplicits
trait EffCreation
trait SafeEffect
trait SafeCreation
trait SafeTypes
trait EvalEffect
trait EvalCreation
trait EvalTypes
trait WriterEffect
class Object
trait Matchable
class Any
Show all
Self type
all.type

Attributes

Supertypes
trait EffCreation
trait SafeCreation
trait SafeTypes
trait EvalCreation
trait EvalTypes
class Object
trait Matchable
class Any
Show all
Self type
create.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait EffCreation
class Object
trait Matchable
class Any
Self type
eff.type
object eval extends EvalEffect

Attributes

Supertypes
trait EvalEffect
trait EvalCreation
trait EvalTypes
class Object
trait Matchable
class Any
Show all
Self type
eval.type
object interpret extends Interpret

Attributes

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

Attributes

Supertypes
trait SafeCreation
trait SafeTypes
class Object
trait Matchable
class Any
Show all
Self type
safe.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
writer.type

Types

type /=[M[_], R] = MemberInOut[M, R]
type <=[M[_], R] = Member[M, R]
type |=[M[_], R] = MemberIn[M, R]