ITree.Events

Standard event types



State


Variant stateE (S : Type) : TypeType :=
| Get : stateE S S
| Put : SstateE S unit.

Reader


Variant readerE (R : Type) : TypeType :=
| Ask : readerE R R.

Writer


Variant writerE (W : Type) : TypeType :=
| Tell : WwriterE W unit.

Exception


Variant exceptE (Err : Type) : TypeType :=
| Throw : ErrexceptE Err void.

Nondeterminism


Variant nondetE : TypeType :=
| Or : nondetE bool.

Map


Variant mapE (K V : Type) : TypeType :=
| Insert : KVmapE unit
| Lookup : KmapE (option V)
| Remove : KmapE unit
.

Concurrency


Inductive spawnE (E : TypeType) : TypeType :=
| Spawn : itree (spawnE E +' E) unitspawnE E unit.

Dependent


 Variant depE {I : Type} (F : IType) : TypeType :=
| Dep (i : I) : depE F (F i).