trait Module
Module bridges three levels of abstraction:
- API. Client code is written against an (MTL-style) API. What API a module provides is module-specific. For example, PropagationModule provides the nutcracker.Propagation API.
- Instruction set. Low-level instructions which are able to express all of the API operations. We define program as the free monad over (a superset of) the instruction set. We consider a variation of free monads, util.FreeK, where the instructions can talk about (the type of) programs in which they are embedded. In the simplest case, there is a one-to-one mapping between the API operations and instructions. There are cases, however, when an API operation has to be split into multiple instructions.
- Interpreter. Interprets (free) programs in terms of state transitions.
- Companion:
- object
class Object
trait Matchable
class Any
trait BranchingModule
trait CostModule[C]
trait PersistentCostModule[C]
trait DeferModule[D]
trait PersistentDeferModule[D]
trait StashDeferModule[D]
trait PersistentStateModule
trait PersistentRelModule
trait PropagationModule
trait StashPropagationModule
trait RelModule
trait StashRelModule
trait StashModule
Type members
Types
Instructions set.
Instructions set.
- Type parameters:
- K
allows instructions to refer to the type of program in which they are embedded. That is,
K
will be instantiated intoFreeK[F, ?]
, whereF[_[_], _]
is a superset of this instruction set (i.e. there is an injection from Lang toF
).