Documentation

Init.ShareCommon

Instances For
    @[extern lean_sharecommon_eq]
    @[extern lean_sharecommon_hash]
    • Map : (α : Type) → Type[inst : BEq α] → [inst : Hashable α] → Type
    • mkMap : {α β : Type} → [inst : BEq α] → [inst_1 : Hashable α] → NatMap α β inst inst_1
    • mapFind? : {α β : Type} → [inst : BEq α] → [inst_1 : Hashable α] → Map α β inst inst_1αOption β
    • mapInsert : {α β : Type} → [inst : BEq α] → [inst_1 : Hashable α] → Map α β inst inst_1αβMap α β inst inst_1
    • Set : (α : Type) → [inst : BEq α] → [inst : Hashable α] → Type
    • mkSet : {α : Type} → [inst : BEq α] → [inst_1 : Hashable α] → NatSet α inst inst_1
    • setFind? : {α : Type} → [inst : BEq α] → [inst_1 : Hashable α] → Set α inst inst_1αOption α
    • setInsert : {α : Type} → [inst : BEq α] → [inst_1 : Hashable α] → Set α inst inst_1αSet α inst inst_1
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      @[implemented_by ShareCommon.StateFactory.mkImpl]

      Internally State is implemented as a pair ObjectMap and ObjectSet

      @[implemented_by ShareCommon.mkStateImpl]
      Equations
      @[extern lean_state_sharecommon]
      Equations
      class MonadShareCommon (m : Type u → Type v) :
      Type (max(u+1)v)
      • withShareCommon : {α : Type u} → αm α
      Instances
        @[inline]
        abbrev withShareCommon {m : Type u_1 → Type u_2} [self : MonadShareCommon m] {α : Type u_1} :
        αm α
        Equations
        @[inline]
        abbrev shareCommonM {m : Type u_1 → Type u_2} {α : Type u_1} [inst : MonadShareCommon m] (a : α) :
        m α
        Equations
        @[inline]
        abbrev ShareCommonT (σ : ShareCommon.StateFactory) (m : Type u → Type v) (α : Type u) :
        Type (maxuv)
        Equations
        @[inline]
        abbrev ShareCommonM (σ : ShareCommon.StateFactory) (α : Type u_1) :
        Type u_1
        Equations
        @[specialize #[]]
        def ShareCommonT.withShareCommon {m : Type u_1 → Type u_2} {α : Type u_1} {σ : ShareCommon.StateFactory} [inst : Monad m] (a : α) :
        ShareCommonT σ m α
        Equations
        Equations
        • ShareCommonT.monadShareCommon = { withShareCommon := fun {α} => ShareCommonT.withShareCommon }
        @[inline]
        def ShareCommonT.run {m : Type u_1 → Type u_2} {σ : ShareCommon.StateFactory} {α : Type u_1} [inst : Monad m] (x : ShareCommonT σ m α) :
        m α
        Equations
        @[inline]
        def ShareCommonM.run {σ : ShareCommon.StateFactory} {α : Type u_1} (x : ShareCommonM σ α) :
        α
        Equations