instance
instSubsingletonStateM
{σ α : Type u_1}
[Subsingleton σ]
[Subsingleton α]
:
Subsingleton (StateM σ α)
Equations
- ⋯ = ⋯
instance
StateT.instAlternative
{σ : Type u}
{m : Type u → Type v}
[Monad m]
[Alternative m]
:
Alternative (StateT σ m)
Equations
- StateT.instAlternative = Alternative.mk (fun {α : Type ?u.30} => StateT.failure) fun {α : Type ?u.30} => StateT.orElse
@[always_inline]
instance
StateT.instMonadFunctor
(σ : Type u_1)
(m : Type u_1 → Type u_2)
:
MonadFunctor m (StateT σ m)
Equations
- StateT.instMonadFunctor σ m = { monadMap := fun {α : Type ?u.24} (f : {β : Type ?u.24} → m β → m β) (x : StateT σ m α) (s : σ) => f (x s) }
@[always_inline]
instance
StateT.instMonadExceptOf
{σ : Type u}
{m : Type u → Type v}
[Monad m]
(ε : Type u_1)
[MonadExceptOf ε m]
:
MonadExceptOf ε (StateT σ m)
Equations
- One or more equations did not get rendered due to their size.
@[inline]
def
ForM.forIn
{m : Type u_1 → Type u_2}
{β : Type u_1}
{ρ : Type u_3}
{α : Type u_4}
[Monad m]
[ForM (StateT β (ExceptT β m)) ρ α]
(x : ρ)
(b : β)
(f : α → β → m (ForInStep β))
:
m β
Adapter to create a ForIn instance from a ForM instance
Equations
- One or more equations did not get rendered due to their size.
Instances For
instance
instMonadStateOfStateTOfMonad
{σ : Type u}
{m : Type u → Type v}
[Monad m]
:
MonadStateOf σ (StateT σ m)
@[always_inline]
instance
StateT.monadControl
(σ : Type u)
(m : Type u → Type v)
[Monad m]
:
MonadControl m (StateT σ m)
Equations
- One or more equations did not get rendered due to their size.
@[always_inline]
instance
StateT.tryFinally
{m : Type u → Type v}
{σ : Type u}
[MonadFinally m]
[Monad m]
:
MonadFinally (StateT σ m)
Equations
- One or more equations did not get rendered due to their size.