Equations
@[inline]
Equations
@[extern lean_sharecommon_eq]
@[extern lean_sharecommon_hash]
@[export lean_mk_object_map]
Equations
@[export lean_object_map_find]
unsafe def
Std.ShareCommon.ObjectMap.find?
(m : Std.ShareCommon.ObjectMap)
(k : Std.ShareCommon.Object)
:
Equations
@[export lean_object_map_insert]
unsafe def
Std.ShareCommon.ObjectMap.insert
(m : Std.ShareCommon.ObjectMap)
(k : Std.ShareCommon.Object)
(v : Std.ShareCommon.Object)
:
Equations
- Std.ShareCommon.ObjectMap.insert m k v = Std.HashMap.insert m k v
@[export lean_mk_object_set]
Equations
@[export lean_object_set_find]
unsafe def
Std.ShareCommon.ObjectSet.find?
(s : Std.ShareCommon.ObjectSet)
(o : Std.ShareCommon.Object)
:
Equations
@[export lean_object_set_insert]
unsafe def
Std.ShareCommon.ObjectSet.insert
(s : Std.ShareCommon.ObjectSet)
(o : Std.ShareCommon.Object)
:
Equations
@[export lean_mk_object_pmap]
Equations
- Std.ShareCommon.mkObjectPersistentMap x = Std.PersistentHashMap.empty
@[export lean_object_pmap_find]
unsafe def
Std.ShareCommon.ObjectPersistentMap.find?
(m : Std.ShareCommon.ObjectPersistentMap)
(k : Std.ShareCommon.Object)
:
Equations
@[export lean_object_pmap_insert]
unsafe def
Std.ShareCommon.ObjectPersistentMap.insert
(m : Std.ShareCommon.ObjectPersistentMap)
(k : Std.ShareCommon.Object)
(v : Std.ShareCommon.Object)
:
Equations
@[export lean_mk_object_pset]
Equations
- Std.ShareCommon.mkObjectPersistentSet x = Std.PersistentHashSet.empty
@[export lean_object_pset_find]
unsafe def
Std.ShareCommon.ObjectPersistentSet.find?
(s : Std.ShareCommon.ObjectPersistentSet)
(o : Std.ShareCommon.Object)
:
Equations
@[export lean_object_pset_insert]
unsafe def
Std.ShareCommon.ObjectPersistentSet.insert
(s : Std.ShareCommon.ObjectPersistentSet)
(o : Std.ShareCommon.Object)
:
Equations
@[inline]
@[extern lean_sharecommon_mk_state]
Equations
- Std.ShareCommon.State.inhabited = { default := Std.ShareCommon.State.empty }
@[inline]
@[extern lean_sharecommon_mk_pstate]
@[inline]
@[extern lean_state_sharecommon]
Equations
- Std.ShareCommon.State.shareCommon s a = (a, s)
@[extern lean_persistent_state_sharecommon]
def
Std.ShareCommon.PersistentState.shareCommon
{α : Type u_1}
(s : Std.ShareCommon.PersistentState)
(a : α)
:
Equations
- Std.ShareCommon.PersistentState.shareCommon s a = (a, s)
- withShareCommon : {α : Type u} → α → m α
@[inline]
abbrev
Std.withShareCommon
{m : Type u_1 → Type u_2}
[self : Std.MonadShareCommon m]
{α : Type u_1}
:
α → m α
@[inline]
abbrev
Std.shareCommonM
{m : Type u_1 → Type u_2}
{α : Type u_1}
[inst : Std.MonadShareCommon m]
(a : α)
:
m α
Equations
@[inline]
Equations
@[inline]
Equations
@[inline]
Equations
@[inline]
Equations
@[specialize]
def
Std.ShareCommonT.withShareCommon
{m : Type u_1 → Type u_2}
{α : Type u_1}
[inst : Monad m]
(a : α)
:
Std.ShareCommonT m α
Equations
- Std.ShareCommonT.withShareCommon a = modifyGet fun s => Std.ShareCommon.State.shareCommon s a
@[specialize]
def
Std.PShareCommonT.withShareCommon
{m : Type u_1 → Type u_2}
{α : Type u_1}
[inst : Monad m]
(a : α)
:
Equations
Equations
- Std.ShareCommonT.monadShareCommon = { withShareCommon := fun {α} => Std.ShareCommonT.withShareCommon }
Equations
- Std.PShareCommonT.monadShareCommon = { withShareCommon := fun {α} => Std.PShareCommonT.withShareCommon }
@[inline]
def
Std.ShareCommonT.run
{m : Type u_1 → Type u_2}
{α : Type u_1}
[inst : Monad m]
(x : Std.ShareCommonT m α)
:
m α
Equations
@[inline]
def
Std.PShareCommonT.run
{m : Type u_1 → Type u_2}
{α : Type u_1}
[inst : Monad m]
(x : Std.PShareCommonT m α)
:
m α
@[inline]
Equations
@[inline]