@[extern lean_run_mod_init]
Run the initializer of the given module (without builtin_initialize
commands).
Return false
if the initializer is not available as native code.
Initializers do not have corresponding Lean definitions, so they cannot be interpreted in this case.
@[extern lean_run_init]
unsafe opaque
Lean.runInit
(env : Lean.Environment)
(opts : Lean.Options)
(decl initDecl : Lean.Name)
:
Run the initializer for decl
and store its value for global access. Should only be used while importing.
Set of modules for which we have already run the module initializer in the interpreter.
unsafe def
Lean.registerInitAttrUnsafe
(attrName : Lean.Name)
(runAfterImport : Bool)
(ref : Lean.Name)
:
Instances For
@[inline]
def
Lean.registerInitAttr
(attrName : Lean.Name)
(runAfterImport : Bool)
(ref : Lean.Name := by exact decl_name%)
:
Equations
- Lean.registerInitAttr attrName runAfterImport ref = Lean.registerInitAttrInnerā attrName runAfterImport ref
Instances For
def
Lean.getInitFnNameForCore?
(env : Lean.Environment)
(attr : Lean.ParametricAttribute Lean.Name)
(fn : Lean.Name)
:
Instances For
@[export lean_get_builtin_init_fn_name_for]
Equations
Instances For
@[export lean_get_regular_init_fn_name_for]
Instances For
@[export lean_get_init_fn_name_for]
Instances For
def
Lean.isIOUnitInitFnCore
(env : Lean.Environment)
(attr : Lean.ParametricAttribute Lean.Name)
(fn : Lean.Name)
:
Instances For
@[export lean_is_io_unit_regular_init_fn]
Instances For
@[export lean_is_io_unit_builtin_init_fn]
Equations
Instances For
Equations
- Lean.isIOUnitInitFn env fn = (Lean.isIOUnitBuiltinInitFn env fn || Lean.isIOUnitRegularInitFn env fn)
Instances For
def
Lean.setBuiltinInitAttr
(env : Lean.Environment)
(declName : Lean.Name)
(initFnName : Lean.Name := Lean.Name.anonymous)
: