Documentation

Init.System.ST

def EST (ε : Type) (σ : Type) :
Equations
@[inline]
abbrev ST (σ : Type) :
Equations
instance instMonadEST (ε : Type) (σ : Type) :
Monad (EST ε σ)
Equations
instance instMonadExceptOfEST (ε : Type) (σ : Type) :
MonadExceptOf ε (EST ε σ)
Equations
instance instInhabitedEST {ε : Type} {σ : Type} {α : Type} [inst : Inhabited ε] :
Inhabited (EST ε σ α)
Equations
instance instMonadST (σ : Type) :
Monad (ST σ)
Equations
class STWorld (σ : outParam Type) (m : TypeType) :
    Instances
      instance instSTWorld {σ : Type} {m : TypeType} {n : TypeType} [inst : MonadLift m n] [inst : STWorld σ m] :
      STWorld σ n
      Equations
      • instSTWorld = { }
      instance instSTWorldEST {ε : Type} {σ : Type} :
      STWorld σ (EST ε σ)
      Equations
      • instSTWorldEST = { }
      @[noinline]
      def runEST {ε : Type} {α : Type} (x : (σ : Type) → EST ε σ α) :
      Except ε α
      Equations
      @[noinline]
      def runST {α : Type} (x : (σ : Type) → ST σ α) :
      α
      Equations
      @[always_inline]
      instance instMonadLiftSTEST {ε : Type} {σ : Type} :
      MonadLift (ST σ) (EST ε σ)
      Equations
      structure ST.Ref (σ : Type) (α : Type) :
      Instances For
        @[extern lean_st_mk_ref]
        opaque ST.Prim.mkRef {σ : Type} {α : Type} (a : α) :
        ST σ (ST.Ref σ α)
        @[extern lean_st_ref_get]
        opaque ST.Prim.Ref.get {σ : Type} {α : Type} (r : ST.Ref σ α) :
        ST σ α
        @[extern lean_st_ref_set]
        opaque ST.Prim.Ref.set {σ : Type} {α : Type} (r : ST.Ref σ α) (a : α) :
        ST σ Unit
        @[extern lean_st_ref_swap]
        opaque ST.Prim.Ref.swap {σ : Type} {α : Type} (r : ST.Ref σ α) (a : α) :
        ST σ α
        @[extern lean_st_ref_take]
        unsafe opaque ST.Prim.Ref.take {σ : Type} {α : Type} (r : ST.Ref σ α) :
        ST σ α
        @[extern lean_st_ref_ptr_eq]
        opaque ST.Prim.Ref.ptrEq {σ : Type} {α : Type} (r1 : ST.Ref σ α) (r2 : ST.Ref σ α) :
        ST σ Bool
        @[inline]
        unsafe def ST.Prim.Ref.modifyUnsafe {σ : Type} {α : Type} (r : ST.Ref σ α) (f : αα) :
        ST σ Unit
        Equations
        @[inline]
        unsafe def ST.Prim.Ref.modifyGetUnsafe {σ : Type} {α : Type} {β : Type} (r : ST.Ref σ α) (f : αβ × α) :
        ST σ β
        Equations
        @[implemented_by ST.Prim.Ref.modifyUnsafe]
        def ST.Prim.Ref.modify {σ : Type} {α : Type} (r : ST.Ref σ α) (f : αα) :
        ST σ Unit
        Equations
        @[implemented_by ST.Prim.Ref.modifyGetUnsafe]
        def ST.Prim.Ref.modifyGet {σ : Type} {α : Type} {β : Type} (r : ST.Ref σ α) (f : αβ × α) :
        ST σ β
        Equations
        @[inline]
        def ST.mkRef {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} (a : α) :
        m (ST.Ref σ α)
        Equations
        @[inline]
        def ST.Ref.get {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} (r : ST.Ref σ α) :
        m α
        Equations
        @[inline]
        def ST.Ref.set {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} (r : ST.Ref σ α) (a : α) :
        Equations
        @[inline]
        def ST.Ref.swap {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} (r : ST.Ref σ α) (a : α) :
        m α
        Equations
        @[inline]
        unsafe def ST.Ref.take {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} (r : ST.Ref σ α) :
        m α
        Equations
        @[inline]
        def ST.Ref.ptrEq {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} (r1 : ST.Ref σ α) (r2 : ST.Ref σ α) :
        Equations
        @[inline]
        def ST.Ref.modify {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} (r : ST.Ref σ α) (f : αα) :
        Equations
        @[inline]
        def ST.Ref.modifyGet {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} {β : Type} (r : ST.Ref σ α) (f : αβ × α) :
        m β
        Equations
        def ST.Ref.toMonadStateOf {σ : Type} {m : TypeType} [inst : MonadLiftT (ST σ) m] {α : Type} (r : ST.Ref σ α) :
        Equations