endless.core.interpret

Members list

Type members

Classlikes

trait BehaviorInterpreter[F[_], S, E, Alg[_[_]]]

Interprets an algebra Alg expressed using Entity in context F with EntityT

Interprets an algebra Alg expressed using Entity in context F with EntityT

Type parameters

Alg

entity algebra

E

event

F

effect type

S

state

Attributes

Returns

interpreted entity algebra in context F

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait DurableBehaviorInterpreter[F[_], S, Alg[_[_]]]

Interprets an algebra Alg expressed using DurableEntity in context F with DurableEntityT

Interprets an algebra Alg expressed using DurableEntity in context F with DurableEntityT

Type parameters

Alg

entity algebra

F

effect type

S

state

Attributes

Returns

interpreted entity algebra in context F

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object EntityT.type
final class EntityT[F[_], S, E, A](val runAcc: (EventsFolder[S, E], Chain[E]) => F[Folded[E, A]]) extends AnyVal

EntityT[F, S, E, A]`` is data type implementing theEntity[F, S, E]state reader and event writer abilities. It is a monad transformer used as an interpreter for functional chains involving calls toEntityread and write, turning them into a result value of F[Folded[E, A]]. Folded[E, A] is either an error or a list of events bundled together with a result value.

EntityT[F, S, E, A]`` is data type implementing theEntity[F, S, E]state reader and event writer abilities. It is a monad transformer used as an interpreter for functional chains involving calls toEntityread and write, turning them into a result value of F[Folded[E, A]]. Folded[E, A] is either an error or a list of events bundled together with a result value.

EntityT interpretation runs with an instance of EventsFolder[S, E] which is a tuple of current state of type S together with event application function EventApplier[S, E]. Interpretation essentially accumulates the written events into a Chain[E] and applies these events to initial state whenever a read is required.

Type parameters

A

value

E

event

F

context

S

state

Value parameters

runAcc

Event folding function

Attributes

Companion
object
Supertypes
class AnyVal
trait Matchable
class Any
object EntityT extends EntityRunFunctions

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
EntityT.type
class EntityTLiftInstance[F[_], S, E](implicit fMonad: Monad[F]) extends Entity[[_] =>> EntityT[F, S, E, _$2], S, E], Monad[[_] =>> EntityT[F, S, E, _$3]]

Attributes

Supertypes
trait Monad[[_] =>> EntityT[F, S, E, _$3]]
trait Applicative[[_] =>> EntityT[F, S, E, _$3]]
trait InvariantMonoidal[[_] =>> EntityT[F, S, E, _$3]]
trait FlatMap[[_] =>> EntityT[F, S, E, _$3]]
trait FlatMapArityFunctions[[_] =>> EntityT[F, S, E, _$3]]
trait Apply[[_] =>> EntityT[F, S, E, _$3]]
trait ApplyArityFunctions[[_] =>> EntityT[F, S, E, _$3]]
trait InvariantSemigroupal[[_] =>> EntityT[F, S, E, _$3]]
trait Semigroupal[[_] =>> EntityT[F, S, E, _$3]]
trait Functor[[_] =>> EntityT[F, S, E, _$3]]
trait Invariant[[_] =>> EntityT[F, S, E, _$3]]
trait Serializable
trait Entity[[_] =>> EntityT[F, S, E, _$2], S, E]
trait EventWriter[[_] =>> EntityT[F, S, E, _$2], E]
trait StateReaderHelpers[[_] =>> EntityT[F, S, E, _$2], S]
trait StateReader[[_] =>> EntityT[F, S, E, _$2], S]
class Object
trait Matchable
class Any
Show all
trait RepositoryInterpreter[F[_], ID, Alg[_[_]], RepositoryAlg[_[_]]]

Interpret an algebra RepositoryAlg expressed using Sharding in context F, materializing the distributed repository

Interpret an algebra RepositoryAlg expressed using Sharding in context F, materializing the distributed repository

Type parameters

Alg

entity algebra

F

effect type

ID

entity ID

RepositoryAlg

repository algebra

Attributes

Returns

interpreted repository algebra in context F

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait SideEffectInterpreter[F[_], S, Alg[_[_]], RepositoryAlg[_[_]]]

Interprets a function F[Unit] describing a side-effect using Effector in context F

Interprets a function F[Unit] describing a side-effect using Effector in context F

Type parameters

Alg

entity algebra

F

effect type

RepositoryAlg

repository algebra

S

state

Attributes

Returns

interpreted side-effect function in context F

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type