Persistent environment extension for storing a single serializable value per module.
Equations
Instances For
def
Lean.registerModuleEnvExtension
{σ : Type}
[Inhabited σ]
(mkInitial : IO σ)
(name : Name := by exact decl_name%)
:
IO (ModuleEnvExtension σ)
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
def
Lean.ModuleEnvExtension.getStateByIdx?
{σ : Type}
[Inhabited σ]
(ext : ModuleEnvExtension σ)
(env : Environment)
(idx : ModuleIdx)
:
Option σ
Equations
- ext.getStateByIdx? env idx = (Lean.PersistentEnvExtension.getModuleEntries ext env idx)[0]?
Instances For
Returns the package (if any) of an imported module (by its index).
Equations
- env.getModulePackageByIdx? idx = (Lean.modPkgExt✝.getStateByIdx? env idx).join
Instances For
@[inline]
Returns the package (if any) of the current module.
Equations
Instances For
@[inline]
Sets the package of the current module.
Equations
Instances For
@[export lean_get_symbol_stem]
Returns the standard base of the native symbol for the compiled constant declName.
For many constants, this is the full symbol. However, initializers have an additional prefix
(i.e., _init_) and boxed functions have an additional suffix (i.e., ___boxed).
Furthermore, some constants do not use this stem at all (e.g., main and definitions
with @[export]).
Equations
- One or more equations did not get rendered due to their size.