trait
Loop[M[_], R, A, B, C] extends AnyRef
Type Members
-
abstract
type
S
Abstract Value Members
-
abstract
val
init: S
-
abstract
def
onApplicativeEffect[X, T[_]](xs: T[M[X]], continuation: Arrs[R, T[X], A], s: S)(implicit arg0: Traverse[T]): Either[(Eff[R, A], S), B]
-
abstract
def
onEffect[X](x: M[X], continuation: Arrs[R, X, A], s: S): Either[(Eff[R, A], S), B]
-
abstract
def
onLastApplicativeEffect[X, T[_]](xs: T[M[X]], continuation: Arrs[R, T[X], Unit], s: S)(implicit arg0: Traverse[T]): Either[(Eff[R, Unit], S), C]
-
abstract
def
onLastEffect[X](x: M[X], continuation: Arrs[R, X, Unit], s: S): Either[(Eff[R, Unit], S), C]
-
abstract
def
onPure(a: A, s: S): Either[(Eff[R, A], S), B]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
Generalisation of Recurse and StateRecurse
The loop defines some state with an initial value which is maintained at each step of the interpretation.
A is the type of Eff values to interpret, and B is the result of the interpretation (generally an other Eff value)
C is the type of result for "last" actions.
- the interpretation of a Pure value either returns the final result or possibly one more Eff value to interpret
- onEffect interprets one effect and possibly uses the continuation to produce the next value to interpret. If no X can be used to run the continuation we might just output one final B value