Persistent environment extension for storing a single serializable value per module.
Instances For
def Lean.registerModuleEnvExtension {σ : Type} [Inhabited σ] (mkInitial : IO σ) (name : Name := by exact decl_name%) :
IO (ModuleEnvExtension σ)
Instances For
@[instance_reducible]
def Lean.ModuleEnvExtension.getStateByIdx? {σ : Type} [Inhabited σ] (ext : ModuleEnvExtension σ) (env : Environment) (idx : ModuleIdx) :
Option σ
Instances For
Returns the package (if any) of an imported module (by its index).
Instances For
@[inline]
Returns the package (if any) of the current module.
Instances For
@[inline]
Sets the package of the current module.
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]).