Instances For
- Lake.instMonadDStoreStateTDRBMapOfMonadOfEqOfCmpWrt
- Lake.instMonadLiftTStateTOfMonadOfMonadStateOf_lake
- Lake.instMonadStoreNameStateTNameMapOfMonad
- Lake.instMonadStoreStateTRBArrayOfMonad
- Lake.instMonadStoreStateTRBMapOfMonad
- Lean.instMonadAlwaysExceptStateT
- Qq.Impl.instMonadLiftUnquoteMStateTUnquoteStateDelabM
- StateT.instAlternative
- StateT.instLawfulMonad
- StateT.instMonad
- StateT.instMonadExceptOf
- StateT.instMonadFunctor
- StateT.instMonadLift
- StateT.monadControl
- StateT.tryFinally
- instMonadStateOfStateTOfMonad
@[reducible]
instance
instSubsingletonStateM
{σ α : Type u_1}
[Subsingleton σ]
[Subsingleton α]
:
Subsingleton (StateM σ α)
@[inline]
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.34} => StateT.failure) fun {α : Type ?u.34} => StateT.orElse
@[inline]
Equations
- StateT.set s' x✝ = pure (PUnit.unit, s')
Equations
- StateT.instMonadLift = { monadLift := fun {α : Type ?u.27} => StateT.lift }
@[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.26} (f : {β : Type ?u.26} → 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.
instance
instMonadStateOfStateTOfMonad
{σ : Type u}
{m : Type u → Type v}
[Monad m]
:
MonadStateOf σ (StateT σ m)
Equations
- instMonadStateOfStateTOfMonad = { get := StateT.get, set := StateT.set, modifyGet := fun {α : Type ?u.27} => StateT.modifyGet }
@[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.