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
Instances For
Equations
def
Lean.ModuleEnvExtension.getStateByIdx?
{σ : Type}
[Inhabited σ]
(ext : ModuleEnvExtension σ)
(env : Environment)
(idx : ModuleIdx)
:
Option σ
Equations
Instances For
Returns the package (if any) of an imported module (by its index).
Equations
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
(see mkMangledBoxedName). Furthermore, some constants do not use this stem at all
(e.g., main and definitions with @[export]).