Package

org.atnos

eff

Permalink

package eff

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. eff
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type <=[M[_], R] = Member[M, R]

    Permalink
  2. case class Apps[R, A, B](functions: Vector[Eff[R, (Any) ⇒ Any]]) extends Product with Serializable

    Permalink

    Sequence of applicative functions from A to B: Eff[R, A => B]

  3. case class Arrs[R, A, B](functions: Vector[(Any) ⇒ Eff[R, Any]]) extends Product with Serializable

    Permalink

    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]

  4. sealed trait Choose[T] extends AnyRef

    Permalink
  5. trait ChooseCreation extends AnyRef

    Permalink
  6. trait ChooseEffect extends ChooseCreation with ChooseInterpretation

    Permalink

    The Choose effect models non-determinism So we can get results, either:

    The Choose effect models non-determinism So we can get results, either:

    • no results (when using ChooseZero)
    • the result for action1 or the result for action b (when using ChoosePlus)

    When running this effect we can "collect" the results with any F which has an Alternative instance.

    For example if F is List then:

    • no results is the empty list
    • the result for a or b is List(a, b)

    If F is Option then:

    • no results is the None
    • the result for a or b is Some(a) or Some(b
  7. trait ChooseImplicits extends AnyRef

    Permalink
  8. trait ChooseInterpretation extends AnyRef

    Permalink
  9. case class ChooseZero[T]() extends Choose[T] with Product with Serializable

    Permalink
  10. case class Correct[E]() extends Validate[E, Unit] with Product with Serializable

    Permalink
  11. sealed trait Eff[R, A] extends AnyRef

    Permalink

    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 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!

    See also

    http://okmij.org/ftp/Haskell/extensible/more.pdf

  12. trait EffCreation extends AnyRef

    Permalink
  13. trait EffImplicits extends AnyRef

    Permalink
  14. trait EffInterpretation extends AnyRef

    Permalink
  15. sealed trait Effect[F[_]] extends AnyRef

    Permalink

    one effect, basically a type constructor

  16. trait ErrorCreation[F] extends ErrorTypes[F]

    Permalink
  17. trait ErrorEffect[F] extends ErrorCreation[F] with ErrorInterpretation[F]

    Permalink

    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 Xor 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.

  18. trait ErrorInterpretation[F] extends ErrorCreation[F]

    Permalink
  19. trait ErrorTypes[F] extends AnyRef

    Permalink
  20. trait EvalCreation extends EvalTypes

    Permalink
  21. trait EvalEffect extends EvalTypes with EvalCreation with EvalInterpretation

    Permalink

    Effect for delayed computations

    Effect for delayed computations

    uses cats.Eval as a supporting data structure

  22. trait EvalInterpretation extends EvalTypes

    Permalink
  23. trait EvalTypes extends AnyRef

    Permalink
  24. case class Evaluate[F, A](run: Xor[Xor[Throwable, F], Eval[A]]) extends Product with Serializable

    Permalink
  25. case class EvaluateValue[A](a: Eval[A]) extends Safe[A] with Product with Serializable

    Permalink
  26. case class FailedFinalizer(t: Throwable) extends Safe[Unit] with Product with Serializable

    Permalink
  27. case class FailedValue[A](t: Throwable) extends Safe[A] with Product with Serializable

    Permalink
  28. trait FutureCreation extends AnyRef

    Permalink
  29. trait FutureEffect extends FutureCreation with FutureInterpretation

    Permalink

    Effect for Future computations

  30. trait FutureInterpretation extends AnyRef

    Permalink
  31. sealed trait Fx extends AnyRef

    Permalink

    Base type for a tree of effect types

  32. final case class Fx1[F[_]](e: Effect[F]) extends Fx with Product with Serializable

    Permalink
  33. final case class Fx2[L[_], R[_]](left: Effect[L], right: Effect[R]) extends Fx with Product with Serializable

    Permalink
  34. final case class Fx3[L[_], M[_], R[_]](left: Effect[L], middle: Effect[M], right: Effect[R]) extends Fx with Product with Serializable

    Permalink
  35. final case class FxAppend[L, R](left: L, right: R) extends Fx with Product with Serializable

    Permalink

    Append a tree of effects to another one

  36. case class Impure[R, X, A](union: Union[R, X], continuation: Arrs[R, X, A]) extends Eff[R, A] with Product with Serializable

    Permalink

    union is a disjoint union of effects returning a value of type X (not specified)

  37. case class ImpureAp[R, X, A](union: Union[R, X], continuation: Apps[R, X, A]) extends Eff[R, A] with Product with Serializable

    Permalink

    union is a disjoint union of effects returning a value of type X (not specified)

  38. trait Interpret extends AnyRef

    Permalink

    Support methods to create an interpreter (or "effect handlers") for a given Eff[M |: R, A].

    Support methods to create an interpreter (or "effect handlers") for a given Eff[M |: R, A]. The aim being to "consume" just that effect and produce a value of type B with possibly other effects: Eff[R, B]

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

    There are 3 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].

    2. interpretState + StateRecurse

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

    3. 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)

  39. trait IntoPoly[R, U] extends AnyRef

    Permalink

    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

    send[Option1, Fx.fx3[Option1, Option2, Option3], Int](Option1(1)). 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

  40. trait IntoPolyLower1 extends IntoPolyLower2

    Permalink
  41. trait IntoPolyLower2 extends IntoPolyLower3

    Permalink
  42. trait IntoPolyLower3 extends IntoPolyLower4

    Permalink
  43. trait IntoPolyLower4 extends AnyRef

    Permalink
  44. trait LeftFold[A, B] extends AnyRef

    Permalink

    support trait for folding values while possibly keeping some internal state

  45. trait ListCreation extends AnyRef

    Permalink
  46. trait ListEffect extends ListCreation with ListInterpretation

    Permalink

    Effect for computations possibly returning several values

  47. trait ListInterpretation extends AnyRef

    Permalink
  48. trait Member[T[_], R] extends MemberIn[T, R]

    Permalink
    Annotations
    @implicitNotFound( ... )
  49. trait MemberIn[T[_], R] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( ... )
  50. trait MemberInLower1 extends MemberInLower2

    Permalink
  51. trait MemberInLower2 extends MemberInLower3

    Permalink
  52. trait MemberInLower3 extends MemberInLower4

    Permalink
  53. trait MemberInLower4 extends MemberInLower5

    Permalink
  54. trait MemberInLower5 extends AnyRef

    Permalink
  55. trait MemberLower1 extends MemberLower2

    Permalink
  56. trait MemberLower10 extends MemberLower11

    Permalink
  57. trait MemberLower11 extends MemberLower12

    Permalink
  58. trait MemberLower12 extends MemberLower13

    Permalink
  59. trait MemberLower13 extends AnyRef

    Permalink
  60. trait MemberLower2 extends MemberLower3

    Permalink
  61. trait MemberLower3 extends MemberLower4

    Permalink
  62. trait MemberLower4 extends MemberLower5

    Permalink
  63. trait MemberLower5 extends MemberLower6

    Permalink
  64. trait MemberLower6 extends MemberLower7

    Permalink
  65. trait MemberLower7 extends MemberLower8

    Permalink
  66. trait MemberLower8 extends MemberLower9

    Permalink
  67. trait MemberLower9 extends MemberLower10

    Permalink
  68. class NoFx extends Fx

    Permalink

    The "empty" tree of effects

  69. trait OptionCreation extends AnyRef

    Permalink
  70. trait OptionEffect extends OptionCreation with OptionInterpretation

    Permalink

    Effect for optional computations

  71. trait OptionInterpretation extends AnyRef

    Permalink
  72. case class Pure[R, A](value: A) extends Eff[R, A] with Product with Serializable

    Permalink
  73. trait ReaderCreation extends AnyRef

    Permalink
  74. trait ReaderEffect extends ReaderCreation with ReaderInterpretation

    Permalink

    Effect for computations depending on an environment.

    Effect for computations depending on an environment.

    The inside datatype for this effect is cats.data.Reader

  75. trait ReaderInterpretation extends AnyRef

    Permalink
  76. sealed trait Safe[A] extends AnyRef

    Permalink

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

  77. trait SafeCreation extends SafeTypes

    Permalink
  78. trait SafeEffect extends SafeCreation with SafeInterpretation

    Permalink
  79. trait SafeInterpretation extends SafeCreation

    Permalink
  80. trait SafeTypes extends AnyRef

    Permalink
  81. trait StateCreation extends AnyRef

    Permalink
  82. trait StateEffect extends StateCreation with StateInterpretation

    Permalink

    Effect for passing state along computations

    Effect for passing state along computations

    Internally backed up by cats.data.State

  83. trait StateInterpretation extends AnyRef

    Permalink
  84. sealed trait Union[+R, A] extends AnyRef

    Permalink

    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

  85. case class Union1[T[_], A](ta: T[A]) extends Union[Fx1[T], A] with Product with Serializable

    Permalink
  86. sealed trait Union2[R, A] extends Union[R, A]

    Permalink
  87. case class Union2L[L[_], R[_], A](t: L[A]) extends Union2[Fx2[L, R], A] with Product with Serializable

    Permalink
  88. case class Union2R[L[_], R[_], A](t: R[A]) extends Union2[Fx2[L, R], A] with Product with Serializable

    Permalink
  89. sealed trait Union3[R, A] extends Union[R, A]

    Permalink
  90. case class Union3L[L[_], M[_], R[_], A](t: L[A]) extends Union3[Fx3[L, M, R], A] with Product with Serializable

    Permalink
  91. case class Union3M[L[_], M[_], R[_], A](t: M[A]) extends Union3[Fx3[L, M, R], A] with Product with Serializable

    Permalink
  92. case class Union3R[L[_], M[_], R[_], A](t: R[A]) extends Union3[Fx3[L, M, R], A] with Product with Serializable

    Permalink
  93. sealed trait UnionAppend[R, A] extends Union[R, A]

    Permalink
  94. case class UnionAppendL[L, R, A](t: Union[L, A]) extends UnionAppend[FxAppend[L, R], A] with Product with Serializable

    Permalink
  95. case class UnionAppendR[L, R, A](t: Union[R, A]) extends UnionAppend[FxAppend[L, R], A] with Product with Serializable

    Permalink
  96. sealed trait Validate[+E, A] extends AnyRef

    Permalink
  97. trait ValidateCreation extends AnyRef

    Permalink
  98. trait ValidateEffect extends ValidateCreation with ValidateInterpretation

    Permalink

    Effect for computation which can fail but will accumulate errors

    Effect for computation which can fail but will accumulate errors

    The runValidate interpreter just collects the messages and returns them at the end

  99. trait ValidateInterpretation extends ValidateCreation

    Permalink
  100. trait WriterCreation extends AnyRef

    Permalink
  101. trait WriterEffect extends WriterCreation with WriterInterpretation

    Permalink

    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
  102. trait WriterInterpretation extends AnyRef

    Permalink
  103. case class Wrong[E](e: E) extends Validate[E, Unit] with Product with Serializable

    Permalink
  104. trait XorCreation extends AnyRef

    Permalink
  105. trait XorEffect extends XorCreation with XorInterpretation

    Permalink

    Effect for computation which can fail

  106. trait XorInterpretation extends AnyRef

    Permalink
  107. type |=[M[_], R] = MemberIn[M, R]

    Permalink

Value Members

  1. object Apps extends Serializable

    Permalink
  2. object Arrs extends Serializable

    Permalink
  3. object BuildInfo

    Permalink
  4. object ChooseCreation extends ChooseCreation

    Permalink
  5. object ChooseEffect extends ChooseEffect

    Permalink
  6. object ChooseImplicits extends ChooseImplicits

    Permalink
  7. object ChooseInterpretation extends ChooseInterpretation

    Permalink
  8. object ChoosePlus extends Choose[Boolean] with Product with Serializable

    Permalink
  9. object Eff extends EffCreation with EffInterpretation with EffImplicits

    Permalink
  10. object EffCreation extends EffCreation

    Permalink
  11. object EffImplicits extends EffImplicits

    Permalink
  12. object EffInterpretation extends EffInterpretation

    Permalink
  13. object ErrorEffect extends ErrorEffect[String]

    Permalink

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

  14. object EvalEffect extends EvalEffect

    Permalink
  15. object EvalInterpretation extends EvalInterpretation

    Permalink
  16. object EvalTypes extends EvalTypes

    Permalink
  17. object Evaluate extends Serializable

    Permalink
  18. object FutureEffect extends FutureEffect

    Permalink
  19. object FutureInterpretation extends FutureInterpretation

    Permalink
  20. object Fx

    Permalink
  21. object Interpret extends Interpret

    Permalink
  22. object IntoPoly extends IntoPolyLower1

    Permalink
  23. object ListCreation extends ListCreation

    Permalink
  24. object ListEffect extends ListEffect

    Permalink
  25. object ListInterpretation extends ListInterpretation

    Permalink
  26. object Member extends MemberLower1

    Permalink
  27. object MemberIn extends MemberInLower1

    Permalink
  28. object NoFx extends NoFx

    Permalink
  29. object OptionCreation extends OptionCreation

    Permalink
  30. object OptionEffect extends OptionEffect

    Permalink
  31. object OptionInterpretation extends OptionInterpretation

    Permalink
  32. object ReaderCreation extends ReaderCreation

    Permalink
  33. object ReaderEffect extends ReaderEffect

    Permalink
  34. object ReaderInterpretation extends ReaderInterpretation

    Permalink
  35. object SafeEffect extends SafeEffect

    Permalink
  36. object SafeInterpretation extends SafeInterpretation

    Permalink
  37. object StateCreation extends StateCreation

    Permalink
  38. object StateEffect extends StateEffect

    Permalink
  39. object StateInterpretation extends StateInterpretation

    Permalink
  40. object ValidateCreation extends ValidateCreation

    Permalink
  41. object ValidateEffect extends ValidateEffect

    Permalink
  42. object ValidateInterpretation extends ValidateInterpretation

    Permalink
  43. object WriterCreation extends WriterCreation

    Permalink
  44. object WriterEffect extends WriterEffect

    Permalink
  45. object WriterInterpretation extends WriterInterpretation

    Permalink
  46. object XorCreation extends XorCreation

    Permalink
  47. object XorEffect extends XorEffect

    Permalink
  48. object XorInterpretation extends XorInterpretation

    Permalink
  49. object all extends ReaderEffect with WriterEffect with StateEffect with EvalEffect with OptionEffect with ListEffect with XorEffect with ValidateEffect with ChooseEffect with FutureEffect with SafeEffect with EffInterpretation with EffCreation with EffImplicits

    Permalink
  50. object choose extends ChooseCreation with ChooseInterpretation

    Permalink
  51. object create extends ReaderCreation with WriterCreation with StateCreation with EvalCreation with OptionCreation with ListCreation with XorCreation with ValidateCreation with ChooseCreation with FutureCreation with EffCreation with SafeCreation

    Permalink
  52. object eff extends EffCreation with EffInterpretation

    Permalink
  53. object eval extends EvalCreation with EvalInterpretation

    Permalink
  54. object future extends FutureCreation with FutureInterpretation

    Permalink
  55. object interpret extends Interpret

    Permalink
  56. object list extends ListCreation with ListInterpretation

    Permalink
  57. object option extends OptionCreation with OptionInterpretation

    Permalink
  58. object reader extends ReaderCreation with ReaderInterpretation

    Permalink
  59. object safe extends SafeCreation with SafeInterpretation

    Permalink
  60. object state extends StateCreation with StateInterpretation

    Permalink
  61. package syntax

    Permalink
  62. object validate extends ValidateCreation with ValidateInterpretation

    Permalink
  63. object writer extends WriterCreation with WriterInterpretation

    Permalink
  64. object xor extends XorCreation with XorInterpretation

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped