Lake Configuration Monads #
Definitions and helpers for interacting with the Lake configuration monads.
A monad equipped with a (read-only) detected environment for Lake.
Equations
Instances For
Equations
- Lake.LakeEnvT.run env self = ReaderT.run self env
Instances For
A monad equipped with a (read-only) Lake Workspace
.
Equations
Instances For
A monad equipped with a (read-only) Lake context.
Equations
Instances For
Make a Lake.Context
from a Workspace
.
Equations
- Lake.mkLakeContext ws = { opaqueWs := Lake.OpaqueWorkspace.mk ws }
Instances For
Equations
- Lake.instMonadLake = { read := (fun (x : Lake.Workspace) => Lake.mkLakeContext x) <$> read }
Equations
- Lake.Context.workspace self = Lake.OpaqueWorkspace.get self.opaqueWs
Instances For
Equations
- Lake.instMonadWorkspace = { read := (fun (x : Lake.Context) => Lake.Context.workspace x) <$> read }
Equations
- Lake.instMonadLakeEnv = { read := (fun (x : Lake.Workspace) => x.lakeEnv) <$> read }
Workspace Helpers #
Get the root package of the context's workspace.
Equations
- Lake.getRootPackage = (fun (x : Lake.Workspace) => x.root) <$> read
Instances For
Try to find a package within the workspace with the given name.
Equations
- Lake.findPackage? name = (fun (x : Lake.Workspace) => Lake.Workspace.findPackage? name x) <$> Lake.getWorkspace
Instances For
Locate the named, buildable, importable, local module in the workspace.
Equations
- Lake.findModule? name = (fun (x : Lake.Workspace) => Lake.Workspace.findModule? name x) <$> Lake.getWorkspace
Instances For
Try to find a Lean executable in the workspace with the given name.
Equations
- Lake.findLeanExe? name = (fun (x : Lake.Workspace) => Lake.Workspace.findLeanExe? name x) <$> Lake.getWorkspace
Instances For
Try to find a Lean library in the workspace with the given name.
Equations
- Lake.findLeanLib? name = (fun (x : Lake.Workspace) => Lake.Workspace.findLeanLib? name x) <$> Lake.getWorkspace
Instances For
Try to find an external library in the workspace with the given name.
Equations
- Lake.findExternLib? name = (fun (x : Lake.Workspace) => Lake.Workspace.findExternLib? name x) <$> Lake.getWorkspace
Instances For
Get the paths added to LEAN_PATH
by the context's workspace.
Equations
- Lake.getLeanPath = (fun (x : Lake.Workspace) => Lake.Workspace.leanPath x) <$> Lake.getWorkspace
Instances For
Get the paths added to LEAN_SRC_PATH
by the context's workspace.
Equations
- Lake.getLeanSrcPath = (fun (x : Lake.Workspace) => Lake.Workspace.leanSrcPath x) <$> Lake.getWorkspace
Instances For
Get the augmented LEAN_PATH
set by the context's workspace.
Equations
- Lake.getAugmentedLeanPath = (fun (x : Lake.Workspace) => Lake.Workspace.augmentedLeanPath x) <$> Lake.getWorkspace
Instances For
Get the augmented LEAN_SRC_PATH
set by the context's workspace.
Equations
- Lake.getAugmentedLeanSrcPath = (fun (x : Lake.Workspace) => Lake.Workspace.augmentedLeanSrcPath x) <$> Lake.getWorkspace
Instances For
Get the augmented environment variables set by the context's workspace.
Equations
- Lake.getAugmentedEnv = (fun (x : Lake.Workspace) => Lake.Workspace.augmentedEnvVars x) <$> Lake.getWorkspace
Instances For
Environment Helpers #
Get the LAKE_PACKAGE_URL_MAP
for the Lake environment. Empty if none.
Instances For
Get the name of Elan toolchain for the Lake environment. Empty if none.
Equations
- Lake.getElanToolchain = (fun (x : Lake.Env) => Lake.Env.toolchain x) <$> Lake.getLakeEnv
Instances For
Search Path Helpers #
Get the detected LEAN_PATH
value of the Lake environment.
Equations
- Lake.getEnvLeanPath = (fun (x : Lake.Env) => Lake.Env.leanPath x) <$> Lake.getLakeEnv
Instances For
Get the detected LEAN_SRC_PATH
value of the Lake environment.
Equations
- Lake.getEnvLeanSrcPath = (fun (x : Lake.Env) => Lake.Env.leanSrcPath x) <$> Lake.getLakeEnv
Instances For
Elan Install Helpers #
Get the detected Elan installation (if one).
Instances For
Get the root directory of the detected Elan installation (i.e., ELAN_HOME
).
Equations
- Lake.getElanHome? = (fun (x : Option Lake.ElanInstall) => Option.map (fun (x : Lake.ElanInstall) => x.home) x) <$> Lake.getElanInstall?
Instances For
Get the path of the elan
binary in the detected Elan installation.
Equations
- Lake.getElan? = (fun (x : Option Lake.ElanInstall) => Option.map (fun (x : Lake.ElanInstall) => x.elan) x) <$> Lake.getElanInstall?
Instances For
Lean Install Helpers #
Get the detected Lean installation.
Instances For
Get the root directory of the detected Lean installation.
Equations
- Lake.getLeanSysroot = (fun (x : Lake.LeanInstall) => x.sysroot) <$> Lake.getLeanInstall
Instances For
Get the Lean source directory of the detected Lean installation.
Equations
- Lake.getLeanSrcDir = (fun (x : Lake.LeanInstall) => x.srcDir) <$> Lake.getLeanInstall
Instances For
Get the Lean library directory of the detected Lean installation.
Equations
- Lake.getLeanLibDir = (fun (x : Lake.LeanInstall) => x.leanLibDir) <$> Lake.getLeanInstall
Instances For
Get the C include directory of the detected Lean installation.
Equations
- Lake.getLeanIncludeDir = (fun (x : Lake.LeanInstall) => x.includeDir) <$> Lake.getLeanInstall
Instances For
Get the system library directory of the detected Lean installation.
Equations
- Lake.getLeanSystemLibDir = (fun (x : Lake.LeanInstall) => x.systemLibDir) <$> Lake.getLeanInstall
Instances For
Get the path of the lean
binary in the detected Lean installation.
Equations
- Lake.getLean = (fun (x : Lake.LeanInstall) => x.lean) <$> Lake.getLeanInstall
Instances For
Get the path of the leanc
binary in the detected Lean installation.
Equations
- Lake.getLeanc = (fun (x : Lake.LeanInstall) => x.leanc) <$> Lake.getLeanInstall
Instances For
Get the path of the ar
binary in the detected Lean installation.
Equations
- Lake.getLeanAr = (fun (x : Lake.LeanInstall) => x.ar) <$> Lake.getLeanInstall
Instances For
Get the path of C compiler in the detected Lean installation.
Equations
- Lake.getLeanCc = (fun (x : Lake.LeanInstall) => x.cc) <$> Lake.getLeanInstall
Instances For
Get the optional LEAN_CC
compiler override of the detected Lean installation.
Equations
- Lake.getLeanCc? = (fun (x : Lake.LeanInstall) => Lake.LeanInstall.leanCc? x) <$> Lake.getLeanInstall
Instances For
Lake Install Helpers #
Get the detected Lake installation.
Instances For
Get the root directory of the detected Lake installation (e.g., LAKE_HOME
).
Equations
- Lake.getLakeHome = (fun (x : Lake.LakeInstall) => x.home) <$> Lake.getLakeInstall
Instances For
Get the source directory of the detected Lake installation.
Equations
- Lake.getLakeSrcDir = (fun (x : Lake.LakeInstall) => x.srcDir) <$> Lake.getLakeInstall
Instances For
Get the Lean library directory of the detected Lake installation.
Equations
- Lake.getLakeLibDir = (fun (x : Lake.LakeInstall) => x.libDir) <$> Lake.getLakeInstall
Instances For
Get the path of the lake
binary in the detected Lake installation.
Equations
- Lake.getLake = (fun (x : Lake.LakeInstall) => x.lake) <$> Lake.getLakeInstall