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.
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.registerInitAttr attrName runAfterImport ref = Lean.registerInitAttrInnerā attrName runAfterImport ref
Instances For
Registers an initialization procedure. Initialization procedures are run in files that import the file they are defined in.
This attribute comes in two kinds: Without arguments, the tagged declaration should have type
IO Unit
and are simply run during initialization. With a declaration name as a argument, the
tagged declaration should be an opaque constant and the provided declaration name an action in IO
that returns a value of the type of the tagged declaration. Such initialization procedures store
the resulting value and make it accessible through the tagged declaration.
The initialize
command should usually be preferred over using this attribute directly.
Registers a builtin initialization procedure.
This attribute is used internally to define builtin initialization procedures for bootstrapping and should not be used otherwise.
Equations
- Lean.getInitFnNameForCore? env attr fn = match attr.getParam? env fn with | some Lean.Name.anonymous => none | some n => some n | x => none
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Lean.getInitFnNameFor? env fn = (Lean.getBuiltinInitFnNameFor? env fn <|> Lean.getRegularInitFnNameFor? env fn)
Instances For
Equations
- Lean.isIOUnitInitFnCore env attr fn = match attr.getParam? env fn with | some Lean.Name.anonymous => true | x => false
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Lean.isIOUnitInitFn env fn = (Lean.isIOUnitBuiltinInitFn env fn || Lean.isIOUnitRegularInitFn env fn)
Instances For
Equations
- Lean.hasInitAttr env fn = (Lean.getInitFnNameFor? env fn).isSome
Instances For
Equations
- Lean.setBuiltinInitAttr env declName initFnName = Lean.builtinInitAttr.setParam env declName initFnName