Edomaton

edomata.core.Edomaton
See theEdomaton companion object
final case class Edomaton[F[_], -Env, R, E, N, A](run: Env => F[ResponseD[R, E, N, A]]) extends AnyVal

Represents programs that are event driven state machines (a Mealy machine)

these programs can use input to decide on a state transition, and optionally emit a sequence of notifications for communication.

Type parameters

A

output type

E

internal event type

Env

input type

F

effect type

N

notification type, a.k.a external event, integration event

R

rejection type

Attributes

Companion
object
Source
Edomaton.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

inline def >>[Env2 <: Env, B](f: => Edomaton[F, Env2, R, E, N, B])(using Monad[F]): Edomaton[F, Env2, R, E, N, B]

alias for andThen, flatMap(_ => f)

alias for andThen, flatMap(_ => f)

Attributes

Source
Edomaton.scala
inline def >>=[Env2 <: Env, B](f: A => Edomaton[F, Env2, R, E, N, B])(using Monad[F]): Edomaton[F, Env2, R, E, N, B]

alias for flatMap

alias for flatMap

Attributes

Source
Edomaton.scala
inline def andThen[Env2 <: Env, B](f: => Edomaton[F, Env2, R, E, N, B])(using Monad[F]): Edomaton[F, Env2, R, E, N, B]

sequences another edomaton without considering output for this one

sequences another edomaton without considering output for this one

alias for flatMap(_ => f)

Attributes

Source
Edomaton.scala
inline def as[B](b: B)(using Functor[F]): Edomaton[F, Env, R, E, N, B]

alias for map(_=> b)

alias for map(_=> b)

Attributes

Source
Edomaton.scala
def contramap[Env2](f: Env2 => Env): Edomaton[F, Env2, R, E, N, A]

creates a new edomaton that translates some input to what this edomaton can understand

creates a new edomaton that translates some input to what this edomaton can understand

Attributes

Source
Edomaton.scala
def decide[B](f: A => Decision[R, E, B])(using Monad[F]): Edomaton[F, Env, R, E, N, B]

Decides based on output

Decides based on output

Attributes

Source
Edomaton.scala
def eval[B](f: => F[B])(using Monad[F]): Edomaton[F, Env, R, E, N, A]

evaluates an effect and uses its result as new output

evaluates an effect and uses its result as new output

Attributes

Source
Edomaton.scala
def evalMap[B](f: A => F[B])(using Monad[F]): Edomaton[F, Env, R, E, N, B]

evaluates an effect using output of this edomaton and uses result of evaluation as new output

evaluates an effect using output of this edomaton and uses result of evaluation as new output

Attributes

Source
Edomaton.scala
def evalTap[B](f: A => F[B])(using Monad[F]): Edomaton[F, Env, R, E, N, A]

like evalMap but ignores evaluation result

like evalMap but ignores evaluation result

Attributes

Source
Edomaton.scala
def flatMap[Env2 <: Env, B](f: A => Edomaton[F, Env2, R, E, N, B])(using Monad[F]): Edomaton[F, Env2, R, E, N, B]

binds another edomaton to this one.

binds another edomaton to this one.

Attributes

Source
Edomaton.scala
def map[B](f: A => B)(using Functor[F]): Edomaton[F, Env, R, E, N, B]

maps output result

maps output result

Attributes

Source
Edomaton.scala
def mapK[G[_]](fk: FunctionK[F, G]): Edomaton[G, Env, R, E, N, A]

translates this program in another language mapped by a natural transformation

translates this program in another language mapped by a natural transformation

Attributes

Source
Edomaton.scala
def publish(ns: N*)(using Functor[F]): Edomaton[F, Env, R, E, N, A]

Adds notification without considering decision state

Adds notification without considering decision state

Attributes

Source
Edomaton.scala
def publishOnRejection(ns: N*)(using Functor[F]): Edomaton[F, Env, R, E, N, A]

publishes these notifications if this edomaton is rejected

publishes these notifications if this edomaton is rejected

Attributes

Source
Edomaton.scala
def publishOnRejectionWith(f: Type[R] => Seq[N])(using Functor[F]): Edomaton[F, Env, R, E, N, A]

If this edomaton is rejected, uses given function to decide what to publish

If this edomaton is rejected, uses given function to decide what to publish

Attributes

Source
Edomaton.scala
def reset(using Functor[F]): Edomaton[F, Env, R, E, N, A]

Clears all notifications so far

Clears all notifications so far

Attributes

Source
Edomaton.scala
def transform[R2, E2, N2, B](f: ResponseD[R, E, N, A] => ResponseD[R2, E2, N2, B])(using Functor[F]): Edomaton[F, Env, R2, E2, N2, B]

transforms underlying response

transforms underlying response

Attributes

Source
Edomaton.scala
def void(using Functor[F]): Edomaton[F, Env, R, E, N, Unit]

Ignores output value

Ignores output value

Attributes

Source
Edomaton.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product