StateEffect

org.atnos.eff.StateEffect
See theStateEffect companion object

Effect for passing state along computations

Internally backed up by cats.data.State

Attributes

Companion
object
Source
StateEffect.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object StateEffect

Members list

Value members

Inherited methods

def evalState[R, U, S, A](initial: S)(w: Eff[R, A])(implicit m: Aux[[_] =>> State[S, _$2], R, U]): Eff[U, A]

run a state effect, with an initial value, return only the value

run a state effect, with an initial value, return only the value

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala
def evalStateZero[R, U, S : Monoid, A](w: Eff[R, A])(implicit evidence$1: Monoid[S], m: Aux[[_] =>> State[S, _$1], R, U]): Eff[U, A]

run a state effect, with a Monoidal state

run a state effect, with a Monoidal state

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala
def execState[R, U, S, A](initial: S)(w: Eff[R, A])(implicit m: Aux[[_] =>> State[S, _$5], R, U]): Eff[U, S]

run a state effect, with an initial value, return only the state

run a state effect, with an initial value, return only the state

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala
def execStateZero[R, U, S : Monoid, A](w: Eff[R, A])(implicit evidence$1: Monoid[S], m: Aux[[_] =>> State[S, _$4], R, U]): Eff[U, S]

run a state effect, with a monoidal state, return only the state

run a state effect, with a monoidal state, return only the state

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala
def get[R, S](implicit member: MemberIn[[_] =>> State[S, _$3], R]): Eff[R, S]

get the current state value

get the current state value

Attributes

Inherited from:
StateCreation
Source
StateCreation.scala
def gets[R, S, T](f: S => T)(implicit member: MemberIn[[_] =>> State[S, _$5], R]): Eff[R, T]

get the current state value and map it with a function f

get the current state value and map it with a function f

Attributes

Inherited from:
StateCreation
Source
StateCreation.scala
def intoState[TS, SS, U1, U2, T, S, A](state: Eff[TS, A], getter: S => T, setter: (S, T) => S)(implicit ts: Aux[[_] =>> State[T, _$14], TS, U1], ss: Aux[[_] =>> State[S, _$15], SS, U2], into: IntoPoly[U1, U2]): Eff[SS, A]

General lifting of a state effect into another from one stack to another. This will require a type annotation

General lifting of a state effect into another from one stack to another. This will require a type annotation

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala
def lensState[TS, SS, U, T, S, A](state: Eff[TS, A], getter: S => T, setter: (S, T) => S)(implicit ts: Aux[[_] =>> State[T, _$12], TS, U], ss: Aux[[_] =>> State[S, _$13], SS, U]): Eff[SS, A]

Lift a computation over a "small" state (for a subsystem) into a computation over a "bigger" state (for the full application state)

Lift a computation over a "small" state (for a subsystem) into a computation over a "bigger" state (for the full application state)

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala
def localState[R, S, A](e: Eff[R, A])(modify: S => S)(implicit s: MemberInOut[[_] =>> State[S, _$20], R]): Eff[R, A]

Update the state value, the stack of the Eff computation stays the same

Update the state value, the stack of the Eff computation stays the same

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala
def modify[R, S](f: S => S)(implicit member: MemberIn[[_] =>> State[S, _$7], R]): Eff[R, Unit]

modify the current state value

modify the current state value

Attributes

Inherited from:
StateCreation
Source
StateCreation.scala
def put[R, S](s: S)(implicit member: MemberIn[[_] =>> State[S, _$1], R]): Eff[R, Unit]

store a new state value

store a new state value

Attributes

Inherited from:
StateCreation
Source
StateCreation.scala
def runState[R, U, S1, A](initial: S1)(w: Eff[R, A])(implicit m: Aux[[_] =>> State[S1, _$8], R, U]): Eff[U, (A, S1)]

run a state effect, with an initial value

run a state effect, with an initial value

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala
def runStateZero[R, U, S : Monoid, A](w: Eff[R, A])(implicit evidence$1: Monoid[S], m: Aux[[_] =>> State[S, _$7], R, U]): Eff[U, (A, S)]

run a state effect, with an initial value

run a state effect, with an initial value

Attributes

Inherited from:
StateInterpretation
Source
StateInterpretation.scala