Equations
- instMonadEST ε σ = inferInstanceAs (Monad (EStateM ε σ))
Equations
- instMonadExceptOfEST ε σ = inferInstanceAs (MonadExceptOf ε (EStateM ε σ))
Equations
- instInhabitedEST = inferInstanceAs (Inhabited (EStateM ε σ α))
Equations
- instMonadST σ = inferInstanceAs (Monad (EST Empty σ))
@[extern lean_st_ref_swap]
@[extern lean_st_ref_take]
@[inline]
Instances For
@[inline]
def
ST.Ref.set
{σ : Type}
{m : Type → Type}
[MonadLiftT (ST σ) m]
{α : Type}
(r : ST.Ref σ α)
(a : α)
:
m Unit
Instances For
@[inline]
def
ST.Ref.swap
{σ : Type}
{m : Type → Type}
[MonadLiftT (ST σ) m]
{α : Type}
(r : ST.Ref σ α)
(a : α)
:
m α
Equations
- r.swap a = liftM (ST.Prim.Ref.swap r a)
Instances For
@[inline]
unsafe def
ST.Ref.take
{σ : Type}
{m : Type → Type}
[MonadLiftT (ST σ) m]
{α : Type}
(r : ST.Ref σ α)
:
m α
Instances For
@[inline]
def
ST.Ref.ptrEq
{σ : Type}
{m : Type → Type}
[MonadLiftT (ST σ) m]
{α : Type}
(r1 r2 : ST.Ref σ α)
:
m Bool
Equations
- r1.ptrEq r2 = liftM (ST.Prim.Ref.ptrEq r1 r2)
Instances For
@[inline]
def
ST.Ref.modify
{σ : Type}
{m : Type → Type}
[MonadLiftT (ST σ) m]
{α : Type}
(r : ST.Ref σ α)
(f : α → α)
:
m Unit
Equations
- r.modify f = liftM (ST.Prim.Ref.modify r f)
Instances For
@[inline]
def
ST.Ref.modifyGet
{σ : Type}
{m : Type → Type}
[MonadLiftT (ST σ) m]
{α β : Type}
(r : ST.Ref σ α)
(f : α → β × α)
:
m β
Equations
- r.modifyGet f = liftM (ST.Prim.Ref.modifyGet r f)
Instances For
def
ST.Ref.toMonadStateOf
{σ : Type}
{m : Type → Type}
[MonadLiftT (ST σ) m]
{α : Type}
(r : ST.Ref σ α)
:
MonadStateOf α m