Eval

cats.Eval$
See theEval companion class
object Eval

Attributes

Companion
class
Source
Eval.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Eval.type

Members list

Type members

Classlikes

sealed abstract class Defer[A](val thunk: () => Eval[A]) extends Eval[A]

Defer is a type of Eval[A] that is used to defer computations which produce Eval[A].

Defer is a type of Eval[A] that is used to defer computations which produce Eval[A].

Users should not instantiate Defer instances themselves. Instead, they will be automatically created when needed.

Attributes

Source
Eval.scala
Supertypes
class Eval[A]
trait Serializable
class Object
trait Matchable
class Any
sealed abstract class FlatMap[A] extends Eval[A]

FlatMap is a type of Eval[A] that is used to chain computations involving .map and .flatMap.

FlatMap is a type of Eval[A] that is used to chain computations involving .map and .flatMap. Along with Eval#flatMap it implements the trampoline that guarantees stack-safety.

Users should not instantiate FlatMap instances themselves. Instead, they will be automatically created when needed.

Unlike a traditional trampoline, the internal workings of the trampoline are not exposed. This allows a slightly more efficient implementation of the .value method.

Attributes

Source
Eval.scala
Supertypes
class Eval[A]
trait Serializable
class Object
trait Matchable
class Any
Self type
FlatMap[A]
sealed abstract class Leaf[A] extends Eval[A]

A Leaf does not depend on any other Eval so calling .value does not trigger any flatMaps or defers

A Leaf does not depend on any other Eval so calling .value does not trigger any flatMaps or defers

Attributes

Source
Eval.scala
Supertypes
class Eval[A]
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
class Always[A]
class Later[A]
class Now[A]

Value members

Concrete methods

def always[A](a: => A): Eval[A]

Construct a lazy Eval[A] value without caching (i.e.

Construct a lazy Eval[A] value without caching (i.e. Always[A]).

Attributes

Source
Eval.scala
def defer[A](a: => Eval[A]): Eval[A]

Defer a computation which produces an Eval[A] value.

Defer a computation which produces an Eval[A] value.

This is useful when you want to delay execution of an expression which produces an Eval[A] value. Like .flatMap, it is stack-safe.

Attributes

Source
Eval.scala
def later[A](a: => A): Eval[A]

Construct a lazy Eval[A] value with caching (i.e.

Construct a lazy Eval[A] value with caching (i.e. Later[A]).

Attributes

Source
Eval.scala
def now[A](a: A): Eval[A]

Construct an eager Eval[A] value (i.e.

Construct an eager Eval[A] value (i.e. Now[A]).

Attributes

Source
Eval.scala

Concrete fields

Static Eval instance for common value false.

Static Eval instance for common value false.

This can be useful in cases where the same value may be needed many times.

Attributes

Source
Eval.scala
val One: Eval[Int]

Static Eval instance for common value 1.

Static Eval instance for common value 1.

This can be useful in cases where the same value may be needed many times.

Attributes

Source
Eval.scala
val True: Eval[Boolean]

Static Eval instance for common value true.

Static Eval instance for common value true.

This can be useful in cases where the same value may be needed many times.

Attributes

Source
Eval.scala
val Unit: Eval[Unit]

Static Eval instance for common value Unit.

Static Eval instance for common value Unit.

This can be useful in cases where the same value may be needed many times.

Attributes

Source
Eval.scala
val Zero: Eval[Int]

Static Eval instance for common value 0.

Static Eval instance for common value 0.

This can be useful in cases where the same value may be needed many times.

Attributes

Source
Eval.scala

Implicits

Inherited implicits

Attributes

Inherited from:
EvalInstances (hidden)
Source
Eval.scala
implicit val catsDeferForEval: Defer[Eval]

Attributes

Inherited from:
EvalInstances (hidden)
Source
Eval.scala
implicit def catsEqForEval[A : Eq]: Eq[Eval[A]]

Attributes

Inherited from:
EvalInstances1 (hidden)
Source
Eval.scala
implicit def catsGroupForEval[A : Group]: Group[Eval[A]]

Attributes

Inherited from:
EvalInstances (hidden)
Source
Eval.scala
implicit def catsMonoidForEval[A : Monoid]: Monoid[Eval[A]]

Attributes

Inherited from:
EvalInstances0 (hidden)
Source
Eval.scala
implicit def catsOrderForEval[A : Order]: Order[Eval[A]]

Attributes

Inherited from:
EvalInstances (hidden)
Source
Eval.scala

Attributes

Inherited from:
EvalInstances0 (hidden)
Source
Eval.scala

Attributes

Inherited from:
EvalInstances (hidden)
Source
Eval.scala

Attributes

Inherited from:
EvalInstances (hidden)
Source
Eval.scala

Attributes

Inherited from:
EvalInstances1 (hidden)
Source
Eval.scala