Executes f
with the corresponding module name for each .lean
file contained in dir
.
For example, if dir
contains A/B/C.lean
, f
is called with A.B.C
.
Equations
- Lean.realPathNormalized p = do let __do_lift ← IO.FS.realPath p pure __do_lift.normalize
Instances For
Instances For
Equations
- Lean.modToFilePath.go base (p.str h) = Lean.modToFilePath.go base p / { toString := h }
- Lean.modToFilePath.go base Lean.Name.anonymous = base
- Lean.modToFilePath.go base (pre.num i) = panicWithPosWithDecl "Lean.Util.Path" "Lean.modToFilePath.go" 40 20 "ill-formed import"
Instances For
A `.olean' search path.
Equations
Instances For
If the package of mod
can be found in sp
, return the path with extension
ext
(lean
or olean
) corresponding to mod
. Otherwise, return none
. Does
not check whether the returned path exists.
Instances For
Like findWithExt
, but ensures the returned path exists.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.getBuildDir = do let __do_lift ← IO.appDir pure __do_lift.parent.get!
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.getBuiltinSearchPath leanSysroot = do let __do_lift ← Lean.getLibDir leanSysroot pure [__do_lift]
Instances For
Initialize Lean's search path given Lean's system root and an initial search path.
The system root can be obtained via getBuildDir
(for internal use) or
findSysroot
(for external users).
Instances For
Infer module name of source file name.
Instances For
Instances For
Find the system root of the given lean
command
by calling lean --print-prefix
and returning the path it prints.
Defaults to trying the lean
in PATH
.
If set, the LEAN_SYSROOT
environment variable takes precedence.
Note that the called lean
binary might not be part of the system root,
e.g. in the case of elan
's proxy binary.
Users internal to Lean should use Lean.getBuildDir
instead.