@[inline, reducible]
A sequence of calls donated by the key type κ
.
Equations
- Lake.CallStack κ = List κ
Instances For
@[inline, reducible]
A transformer that equips a monad with a CallStack
to detect cycles.
Equations
- Lake.CycleT κ m = ReaderT (Lake.CallStack κ) (ExceptT (Lake.Cycle κ) m)
Instances For
@[inline]
def
Lake.guardCycle
{κ : Type u_1}
{m : Type u_1 → Type u_2}
{α : Type u_1}
[BEq κ]
[Monad m]
(key : κ)
(act : Lake.CycleT κ m α)
:
Lake.CycleT κ m α
Add key
to the monad's CallStack
before invoking act
.
If adding key
produces a cycle, the cyclic call stack is thrown.
Equations
- One or more equations did not get rendered due to their size.