A Lean library -- its package plus its configuration.
- pkg : Lake.Package
The package the library belongs to.
- config : Lake.LeanLibConfig
The library's user-defined configuration.
Instances For
The Lean libraries of the package (as an Array).
Equations
- Lake.Package.leanLibs self = Lake.RBArray.foldl (fun (a : Array Lake.LeanLib) (v : Lake.LeanLibConfig) => Array.push a { pkg := self, config := v }) #[] self.leanLibConfigs
Instances For
Try to find a Lean library in the package with the given name.
Equations
- Lake.Package.findLeanLib? name self = Option.map (fun (x : Lake.LeanLibConfig) => { pkg := self, config := x }) (Lake.RBArray.find? self.leanLibConfigs name)
Instances For
The library's well-formed name.
Equations
- Lake.LeanLib.name self = self.config.name
Instances For
The package's srcDir
joined with the library's srcDir
.
Equations
- Lake.LeanLib.srcDir self = Lake.Package.srcDir self.pkg / self.config.srcDir
Instances For
The library's root directory for lean
(i.e., srcDir
).
Equations
- Lake.LeanLib.rootDir self = Lake.LeanLib.srcDir self
Instances For
The names of the library's root modules
(i.e., the library's roots
configuration).
Equations
- Lake.LeanLib.roots self = self.config.roots
Instances For
Whether the given module is considered local to the library.
Equations
- Lake.LeanLib.isLocalModule mod self = Lake.LeanLibConfig.isLocalModule mod self.config
Instances For
Whether the given module is a buildable part of the library.
Equations
- Lake.LeanLib.isBuildableModule mod self = Lake.LeanLibConfig.isBuildableModule mod self.config
Instances For
The file name of the library's static binary (i.e., its .a
)
Equations
- Lake.LeanLib.staticLibFileName self = { toString := Lake.nameToStaticLib self.config.libName }
Instances For
The path to the static library in the package's libDir
.
Equations
- Lake.LeanLib.staticLibFile self = Lake.Package.nativeLibDir self.pkg / Lake.LeanLib.staticLibFileName self
Instances For
The library's extraDepTargets
configuration.
Equations
- Lake.LeanLib.extraDepTargets self = self.config.extraDepTargets
Instances For
Whether to precompile the library's modules.
Is true if either the package or the library have precompileModules
set.
Equations
- Lake.LeanLib.precompileModules self = (Lake.Package.precompileModules self.pkg || self.config.precompileModules)
Instances For
Whether to the library's Lean code is platform-independent.
Returns the library's platformIndependent
configuration if non-none
.
Otherwise, falls back to the package's.
Equations
- Lake.LeanLib.platformIndependent self = HOrElse.hOrElse self.config.toLeanConfig.platformIndependent fun (x : Unit) => Lake.Package.platformIndependent self.pkg
Instances For
The library's defaultFacets
configuration.
Equations
- Lake.LeanLib.defaultFacets self = self.config.defaultFacets
Instances For
The library's nativeFacets
configuration.
Equations
- Lake.LeanLib.nativeFacets self = self.config.nativeFacets
Instances For
The arguments to pass to lean --server
when running the Lean language server.
serverOptions
is the the accumulation of:
- the package's
leanOptions
- the package's
moreServerOptions
- the library's
leanOptions
- the library's
moreServerOptions
Equations
- Lake.LeanLib.serverOptions self = Lake.Package.moreServerOptions self.pkg ++ self.config.toLeanConfig.leanOptions ++ self.config.toLeanConfig.moreServerOptions
Instances For
The build type for modules of this library.
That is, the minimum of package's buildType
and the library's buildType
.
Equations
- Lake.LeanLib.buildType self = min (Lake.Package.buildType self.pkg) self.config.toLeanConfig.buildType
Instances For
The backend type for modules of this library.
Prefer the library's backend
configuration, then the package's,
then the default (which is C for now).
Equations
- Lake.LeanLib.backend self = Lake.Backend.orPreferLeft self.config.toLeanConfig.backend (Lake.Package.backend self.pkg)
Instances For
The arguments to pass to lean
when compiling the library's Lean files.
leanArgs
is the accumulation of:
- the package's
leanOptions
- the package's
moreLeanArgs
- the library's
leanOptions
- the library's
moreLeanArgs
Equations
- One or more equations did not get rendered due to their size.
Instances For
The arguments to weakly pass to lean
when compiling the library's Lean files.
That is, the package's weakLeanArgs
plus the library's weakLeanArgs
.
Equations
- Lake.LeanLib.weakLeanArgs self = Lake.Package.weakLeanArgs self.pkg ++ self.config.toLeanConfig.weakLeanArgs
Instances For
The arguments to pass to leanc
when compiling the library's Lean-produced C files.
That is, the build type's leancArgs
, the package's moreLeancArgs
,
and then the library's moreLeancArgs
.
Equations
- Lake.LeanLib.leancArgs self = Lake.BuildType.leancArgs (Lake.LeanLib.buildType self) ++ Lake.Package.moreLeancArgs self.pkg ++ self.config.toLeanConfig.moreLeancArgs
Instances For
The arguments to weakly pass to leanc
when compiling the library's Lean-produced C files.
That is, the package's weakLeancArgs
plus the library's weakLeancArgs
.
Equations
- Lake.LeanLib.weakLeancArgs self = Lake.Package.weakLeancArgs self.pkg ++ self.config.toLeanConfig.weakLeancArgs
Instances For
The arguments to pass to leanc
when linking the shared library.
That is, the package's moreLinkArgs
plus the library's moreLinkArgs
.
Equations
- Lake.LeanLib.linkArgs self = Lake.Package.moreLinkArgs self.pkg ++ self.config.toLeanConfig.moreLinkArgs
Instances For
The arguments to weakly pass to leanc
when linking the shared library.
That is, the package's weakLinkArgs
plus the library's weakLinkArgs
.
Equations
- Lake.LeanLib.weakLinkArgs self = Lake.Package.weakLinkArgs self.pkg ++ self.config.toLeanConfig.weakLinkArgs