Maps keyed by declarations whose imported part is assembled from per-module data without inserting every entry: an entry about a constant declared in the module that added it is looked up in that module's sorted array, found using the imported constants, and only the remaining entries are kept in a hash map.
Keys of an ImportedDeclKeyedMap: a declaration name plus possibly more data.
Instances
Equations
- Lean.instKeyName = { declName := id, lt := Lean.Name.quickLt }
The imported part of a DeclKeyedMap.
- consts : ImportedConsts ConstantInfo
The imported constants, used to find the module declaring a constant.
Per module index, the keys of the entries owned by the module (see
isOwned), sorted.Per module index, the values of the owned entries, in the order of
ownedKeys, or no values if they are alldefault.- foreign : PHashMap κ α
The entries not owned by the module declaring their constant; they override owned entries.
Instances For
Equations
Whether the current module owns an entry about constant n: it declares n, which does not have
a reserved name. Constants with reserved names, such as equational theorems, may be realized by
several modules.
Equations
- Lean.ImportedDeclKeyedMap.isOwned env n = (((env.setExporting false).getModuleIdxFor? n).isNone && !Lean.isReservedName env n)
Instances For
Assembles the imported entries of all modules, given in module order as keys and values (or no
values if they are all default): those owned by a module, as returned by sortOwned, at the
module's index, and the remaining ones, of which later ones override earlier ones.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- m.find? k = (Lean.PersistentHashMap.find? m.foreign k <|> Lean.ImportedDeclKeyedMap.findOwned?✝ m k)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
A map keyed by declarations, consisting of entries imported as an ImportedDeclKeyedMap and the
changes made since.
- imported : ImportedDeclKeyedMap κ α
- removed : PHashSet κ
The erased imported keys not in
added. - added : PHashMap κ α
The entries added since the import, overriding imported ones.
Instances For
Equations
Equations
Instances For
Instances For
Equations
- m.insert k v = { imported := m.imported, removed := Lean.PersistentHashSet.erase m.removed k, added := Lean.PersistentHashMap.insert m.added k v }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.DeclKeyedMap.fold f init d = (Lean.DeclKeyedMap.foldM (fun (x1 : β) (x2 : κ) (x3 : α) => pure (f x1 x2 x3)) init d).run
Instances For
Whether the map is empty, by visiting entries up to the first one.