Allows iteration over the modules (any *.lean file) under dir via
for (mod, dirEntry) in mods do. Usually invoked via for (mod, dirEntry) in dir.modules do; see
ImportGraph.System.FilePath.modules for details.
- dir : System.FilePath
- root : Lean.Name
Instances For
Allows iteration over the modules (any *.lean file) under dir via
for (mod, dirEntry) in dir.modules do, descending into subdirectories (top-down, left-to-right),
and constructing the module name according to the directory names and *.lean filenames.
For example, if dir contains A/B/C.lean, this iteration visits (A.B.C, ⟨"A/B", "C.lean"⟩).
If root is provided, then root is prepended to the module names created from paths in the
directory, e.g. if dir contains A/B/C.lean and we iterate through
for (mod, dirEntry) in dir.modules (root := `Foo), this iteration visits
(Foo.A.B.C, ⟨"A/B", "C.lean"⟩).
By default, no root is inferred.
Equations
- ImportGraph.System.FilePath.modules dir root = { dir := dir, root := root }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Splits path into the DirEntry for its enclosing directory and file name, as readDir would
report it. path.parent (rather than path.withFileName "") is used for root so that it carries
no trailing separator and so that root / fileName round-trips back to path (matching the entries
produced when iterating through a directory).
Equations
Instances For
Missing instances #
Equations
Instances For
Equations
Instances For
Equations
- ImportGraph.Lake.instHashableToolchainVer_importGraph.hash (Lake.ToolchainVer.release a) = mixHash 0 (hash a)
- ImportGraph.Lake.instHashableToolchainVer_importGraph.hash (Lake.ToolchainVer.nightly a a_1) = mixHash (mixHash 1 (hash a)) (hash a_1)
- ImportGraph.Lake.instHashableToolchainVer_importGraph.hash (Lake.ToolchainVer.pr a) = mixHash 2 (hash a)
- ImportGraph.Lake.instHashableToolchainVer_importGraph.hash (Lake.ToolchainVer.other a) = mixHash 3 (hash a)
Instances For
Equations
- ImportGraph.Lake.instToJsonGlob_importGraph.toJson (Lake.Glob.one a) = Lean.Json.mkObj [("one", Lean.toJson a)]
- ImportGraph.Lake.instToJsonGlob_importGraph.toJson (Lake.Glob.submodules a) = Lean.Json.mkObj [("submodules", Lean.toJson a)]
- ImportGraph.Lake.instToJsonGlob_importGraph.toJson (Lake.Glob.andSubmodules a) = Lean.Json.mkObj [("andSubmodules", Lean.toJson a)]
Instances For
Equations
for ... in instances #
Allows iteration over the matched modules via for (mod, dirEntry) in globMods do. This is
typically constructed via glob.modulesIn dir.
- glob : Lake.Glob
- dir : System.FilePath
Instances For
Iterates over the module names selected by glob, resolving submodule globs against the .lean
files found under dir.
Auxiliary to the ForIn instance for Glob.Modules.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Loads the lake workspace from the current directory (or, if specified, from wsDir?) in IO.
Note that in the language server, the current working directory is the workspace root, so this may use the current working directory of elaboration. However, it may not itself be called directly during elaboration, as this causes the language server to crash. Therefore, for use "in" the language server, it must be called across a process boundary via an exe.
Equations
- One or more equations did not get rendered due to their size.