File: .lake/packages/lean4/src/lean/Init/System/ST.lean

full_name: EST
code: def EST (ε : Type) (σ : Type) : Type → Type 
goal: Type → Type

full_name: ST
code: abbrev ST (σ : Type) 
goal: Type → Type

full_name: instMonadEST
code: instance (ε σ : Type) : Monad (EST ε σ) 
goal: Monad (EST ε σ)

full_name: instMonadExceptOfEST
code: instance (ε σ : Type) : MonadExceptOf ε (EST ε σ) 
goal: MonadExceptOf ε (EST ε σ)

full_name: instInhabitedEST
code: instance {ε σ : Type} {α : Type} [Inhabited ε] : Inhabited (EST ε σ α) 
goal: Inhabited (EST ε σ α)

full_name: instMonadST
code: instance (σ : Type) : Monad (ST σ) 
goal: Monad (ST σ)

full_name: STWorld
code: class STWorld (σ : outParam Type) (m : Type → Type)
goal: Type

full_name: instSTWorldOfMonadLift
code: instance {σ m n} [MonadLift m n] [STWorld σ m] : STWorld σ n 
goal: STWorld σ n

full_name: instSTWorldEST
code: instance {ε σ} : STWorld σ (EST ε σ) 
goal: STWorld σ (EST ε σ)

full_name: runEST
code: @[noinline, nospecialize]
def runEST {ε α : Type} (x : (σ : Type) → EST ε σ α) : Except ε α 
goal: Except ε α

full_name: runST
code: @[noinline, nospecialize]
def runST {α : Type} (x : (σ : Type) → ST σ α) : α 
goal: α

full_name: instMonadLiftSTEST
code: @[always_inline]
instance {ε σ} : MonadLift (ST σ) (EST ε σ) 
goal: MonadLift (ST σ) (EST ε σ)

full_name: ST.RefPointed
code: /-- References -/
opaque RefPointed : NonemptyType.{0}
goal: NonemptyType

full_name: ST.Ref.h
code: structure Ref (σ : Type) (α : Type) : Type where
  ref : RefPointed.type
  h   : Nonempty α
goal: Nonempty α

full_name: ST.Ref.ref
code: structure Ref (σ : Type) (α : Type) : Type where
  ref : RefPointed.type
  h   : Nonempty α
goal: ST.RefPointed.type

full_name: ST.Ref
code: structure Ref (σ : Type) (α : Type) : Type where
  ref : RefPointed.type
  h   : Nonempty α
goal: Type

full_name: ST.instNonemptyRef
code: instance {σ α} [s : Nonempty α] : Nonempty (Ref σ α) 
goal: Nonempty (ST.Ref σ α)

full_name: _private.«.lake».packages.lean4.src.lean.Init.System.ST.0.ST.Prim.inhabitedFromRef
code: /-- Auxiliary definition for showing that `ST σ α` is inhabited when we have a `Ref σ α` -/
private noncomputable def inhabitedFromRef {σ α} (r : Ref σ α) : ST σ α 
goal: ST σ α

full_name: ST.Prim.mkRef
code: @[extern "lean_st_mk_ref"]
opaque mkRef {σ α} (a : α) : ST σ (Ref σ α) 
goal: ST σ (ST.Ref σ α)

full_name: ST.Prim.Ref.get
code: @[extern "lean_st_ref_get"]
opaque Ref.get {σ α} (r : @& Ref σ α) : ST σ α 
goal: ST σ α

full_name: ST.Prim.Ref.set
code: @[extern "lean_st_ref_set"]
opaque Ref.set {σ α} (r : @& Ref σ α) (a : α) : ST σ Unit
goal: ST σ Unit

full_name: ST.Prim.Ref.swap
code: @[extern "lean_st_ref_swap"]
opaque Ref.swap {σ α} (r : @& Ref σ α) (a : α) : ST σ α 
goal: ST σ α

full_name: ST.Prim.Ref.take
code: @[extern "lean_st_ref_take"]
unsafe opaque Ref.take {σ α} (r : @& Ref σ α) : ST σ α 
goal: ST σ α

full_name: ST.Prim.Ref.ptrEq
code: @[extern "lean_st_ref_ptr_eq"]
opaque Ref.ptrEq {σ α} (r1 r2 : @& Ref σ α) : ST σ Bool
goal: ST σ Bool

full_name: ST.Prim.Ref.modifyUnsafe
code: @[inline] unsafe def Ref.modifyUnsafe {σ α : Type} (r : Ref σ α) (f : α → α) : ST σ Unit 
goal: ST σ Unit

full_name: ST.Prim.Ref.modifyGetUnsafe
code: @[inline] unsafe def Ref.modifyGetUnsafe {σ α β : Type} (r : Ref σ α) (f : α → β × α) : ST σ β 
goal: ST σ β

full_name: ST.Prim.Ref.modify
code: @[implemented_by Ref.modifyUnsafe]
def Ref.modify {σ α : Type} (r : Ref σ α) (f : α → α) : ST σ Unit 
goal: ST σ Unit

full_name: ST.Prim.Ref.modifyGet
code: @[implemented_by Ref.modifyGetUnsafe]
def Ref.modifyGet {σ α β : Type} (r : Ref σ α) (f : α → β × α) : ST σ β 
goal: ST σ β

full_name: ST.mkRef
code: @[inline] def mkRef {α : Type} (a : α) : m (Ref σ α) 
goal: m (ST.Ref σ α)

full_name: ST.Ref.get
code: @[inline] def Ref.get {α : Type} (r : Ref σ α) : m α 
goal: m α

full_name: ST.Ref.set
code: @[inline] def Ref.set {α : Type} (r : Ref σ α) (a : α) : m Unit 
goal: m Unit

full_name: ST.Ref.swap
code: @[inline] def Ref.swap {α : Type} (r : Ref σ α) (a : α) : m α 
goal: m α

full_name: ST.Ref.take
code: @[inline] unsafe def Ref.take {α : Type} (r : Ref σ α) : m α 
goal: m α

full_name: ST.Ref.ptrEq
code: @[inline] def Ref.ptrEq {α : Type} (r1 r2 : Ref σ α) : m Bool 
goal: m Bool

full_name: ST.Ref.modify
code: @[inline] def Ref.modify {α : Type} (r : Ref σ α) (f : α → α) : m Unit 
goal: m Unit

full_name: ST.Ref.modifyGet
code: @[inline] def Ref.modifyGet {α : Type} {β : Type} (r : Ref σ α) (f : α → β × α) : m β 
goal: m β

full_name: ST.Ref.toMonadStateOf
code: def Ref.toMonadStateOf (r : Ref σ α) : MonadStateOf α m 
goal: MonadStateOf α m