Collects the names of private declarations referenced in definition n
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Get the module index given a module name.
Equations
- env.moduleIdxForModule? mod = Option.map (fun (idx : Fin env.allImportedModuleNames.size) => ↑idx) (env.allImportedModuleNames.indexOf? mod)
Instances For
Get the list of declarations in a module (referenced by index).
Equations
- env.declsInModuleIdx idx = Std.HashMap.fold (fun (acc : List Lean.Name) (n : Lean.Name) (i : Lean.ModuleIdx) => if i = idx then n :: acc else acc) [] env.const2ModIdx
Instances For
Add info to the info tree corresponding to a module name.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Core elaborator for open private
and export private
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The command open private a b c in foo bar
will look for private definitions named a
, b
, c
in declarations foo
and bar
and open them in the current scope. This does not make the
definitions public, but rather makes them accessible in the current section by the short name a
instead of the (unnameable) internal name for the private declaration, something like
_private.Other.Module.0.Other.Namespace.foo.a
, which cannot be typed directly because of the 0
name component.
It is also possible to specify the module instead with
open private a b c from Other.Module
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Elaborator for open private
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The command export private a b c in foo bar
is similar to open private
, but instead of opening
them in the current scope it will create public aliases to the private definition. The definition
will exist at exactly the original location and name, as if the private
keyword was not used
originally.
It will also open the newly created alias definition under the provided short name, like
open private
.
It is also possible to specify the module instead with
export private a b c from Other.Module
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Elaborator for export private
.
Equations
- One or more equations did not get rendered due to their size.