def
Lean.Kernel.Environment.addDecl
(env : Environment)
(opts : Options)
(decl : Declaration)
(cancelTk? : Option IO.CancelToken := none)
:
Adds given declaration to the environment, respecting debug.skipKernelTC.
Instances For
If warn.sorry is set to true, then, so long as the message log does not already have any errors,
declarations with sorryAx generate the "declaration uses sorry" warning.
If the warn.sorry option is set to true and there are no errors in the log already,
logs a warning if the declaration uses sorry.
Instances For
Adds the given declaration to the environment's private scope, deriving a suitable presentation in
the public scope if under the module system and if the declaration is not private. If forceExpose
is true, exposes the declaration body, i.e. preserves the full representation in the public scope,
independently of Environment.isExporting and even for theorems.