File: .lake/packages/lean4/src/lean/Lean/Util/Path.lean

full_name: Lean.forEachModuleInDir
code: /--
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`.
-/
partial def forEachModuleInDir [Monad m] [MonadLiftT IO m]
    (dir : FilePath) (f : Lean.Name → m PUnit) : m PUnit 
goal: m PUnit

full_name: Lean.realPathNormalized
code: def realPathNormalized (p : FilePath) : IO FilePath 
goal: IO System.FilePath

full_name: Lean.modToFilePath
code: def modToFilePath (base : FilePath) (mod : Name) (ext : String) : FilePath 
goal: System.FilePath

full_name: Lean.modToFilePath.go
code: def modToFilePath (base : FilePath) (mod : Name) (ext : String) : FilePath 
goal: Lean.Name → System.FilePath

full_name: Lean.SearchPath
code: /-- A `.olean' search path. -/
abbrev SearchPath 
goal: Type

full_name: Lean.SearchPath.findWithExt
code: /-- 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. -/
def findWithExt (sp : SearchPath) (ext : String) (mod : Name) : IO (Option FilePath) 
goal: IO (Option System.FilePath)

full_name: Lean.SearchPath.findModuleWithExt
code: /-- Like `findWithExt`, but ensures the returned path exists. -/
def findModuleWithExt (sp : SearchPath) (ext : String) (mod : Name) : IO (Option FilePath) 
goal: IO (Option System.FilePath)

full_name: Lean.SearchPath.findAllWithExt
code: def findAllWithExt (sp : SearchPath) (ext : String) : IO (Array FilePath) 
goal: IO (Array System.FilePath)

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Util.Path._hyg.744
code: builtin_initialize searchPathRef : IO.Ref SearchPath ← IO.mkRef {}
goal: IO (IO.Ref Lean.SearchPath)

full_name: Lean.searchPathRef
code: builtin_initialize searchPathRef : IO.Ref SearchPath ← IO.mkRef {}
goal: IO.Ref Lean.SearchPath

full_name: Lean.getBuildDir
code: @[export lean_get_prefix]
def getBuildDir : IO FilePath 
goal: IO System.FilePath

full_name: Lean.getLibDir
code: @[export lean_get_libdir]
def getLibDir (leanSysroot : FilePath) : IO FilePath 
goal: IO System.FilePath

full_name: Lean.getBuiltinSearchPath
code: def getBuiltinSearchPath (leanSysroot : FilePath) : IO SearchPath 
goal: IO Lean.SearchPath

full_name: Lean.addSearchPathFromEnv
code: def addSearchPathFromEnv (sp : SearchPath) : IO SearchPath 
goal: IO Lean.SearchPath

full_name: Lean.initSearchPath
code: /--
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). -/
def initSearchPath (leanSysroot : FilePath) (sp : SearchPath := ∅) : IO Unit 
goal: IO Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Util.Path.0.Lean.initSearchPathInternal
code: @[export lean_init_search_path]
private def initSearchPathInternal : IO Unit 
goal: IO Unit

full_name: Lean.findOLean
code: partial def findOLean (mod : Name) : IO FilePath 
goal: IO System.FilePath

full_name: Lean.moduleNameOfFileName
code: /-- Infer module name of source file name. -/
@[export lean_module_name_of_file]
def moduleNameOfFileName (fname : FilePath) (rootDir : Option FilePath) : IO Name 
goal: IO Lean.Name

full_name: Lean.searchModuleNameOfFileName
code: def searchModuleNameOfFileName (fname : FilePath) (rootDirs : SearchPath) : IO (Option Name) 
goal: IO (Option Lean.Name)

full_name: Lean.findSysroot
code: /--
  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.
-/
def findSysroot (lean := "lean") : IO FilePath 
goal: IO System.FilePath