EResult ε σ α is equivalent to Except ε α × σ, but using a single
combined inductive yields a more efficient data representation.
This is a universe-polymorphic version of EStateM.Result.
- ok {ε : Type u} {σ : Type v} {α : Type w} : α → σ → EResult ε σ α
A success value of type
α, and a new stateσ. - error {ε : Type u} {σ : Type v} {α : Type w} : ε → σ → EResult ε σ α
A failure value of type
ε, and a new stateσ.
Instances For
Instances For
Instances For
@[instance_reducible]
instance Lake.EStateT.instMonadStateOfOfPure {ε : Type u} {σ : Type v} {m : Type (max u v) → Type u_1} [Pure m] :
MonadStateOf σ (EStateT ε σ m)
@[instance_reducible]
instance Lake.EStateT.instMonadExceptOfOfMonad {ε : Type u} {σ : Type v} {m : Type (max (max u v) u_1) → Type u_2} [Monad m] :
MonadExceptOf ε (EStateT ε σ m)
@[instance_reducible, always_inline]
instance Lake.EStateT.instMonadFinallyOfMonad {ε : Type u} {σ : Type v} {m : Type (max (max u v) u_1) → Type u_2} [Monad m] :
MonadFinally (EStateT ε σ m)
EStateM is analogous to Lake.EStateT with m := Id.
Instances For
Lake.EStateT with m := Id and all the types in the same universe is analogous to EStateM.