A Lean executable -- its package plus its configuration.
- pkg : Lake.Package
The package the executable belongs to.
- config : Lake.LeanExeConfig
The executable's user-defined configuration.
Instances For
The Lean executables of the package (as an Array).
Equations
- self.leanExes = Lake.RBArray.foldl (fun (a : Array Lake.LeanExe) (v : Lake.LeanExeConfig) => a.push { pkg := self, config := v }) #[] self.leanExeConfigs
Instances For
Try to find a Lean executable in the package with the given name.
Equations
- Lake.Package.findLeanExe? name self = Option.map (fun (x : Lake.LeanExeConfig) => { pkg := self, config := x }) (Lake.RBArray.find? self.leanExeConfigs name)
Instances For
Converts the executable configuration into a library with a single module (the root).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Converts the executable into a library with a single module (the root).
Equations
- self.toLeanLib = { pkg := self.pkg, config := self.config.toLeanLibConfig }
Instances For
The executable's root module.
Equations
Instances For
Return the root module if the name matches, otherwise return none.
Equations
Instances For
The file name of binary executable
(i.e., exeName
plus the platform's exeExtension
).
Equations
- self.fileName = { toString := self.config.exeName }.addExtension System.FilePath.exeExtension
Instances For
The path to the executable in the package's binDir
.
Instances For
The executable's supportInterpreter
configuration.
Equations
- self.supportInterpreter = self.config.supportInterpreter
Instances For
The arguments to pass to leanc
when linking the binary executable.
By default, the package's plus the executable's moreLinkArgs
.
If supportInterpreter := true
, Lake links directly to the Lean shared
libraries on Windows by prepending -leanshared
and adds -rdynamic
on
other systems.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The arguments to weakly pass to leanc
when linking the binary executable.
That is, the package's weakLinkArgs
plus the executable's weakLinkArgs
.
Instances For
Locate the named, buildable, but not necessarily importable, module in the package.
Equations
- Lake.Package.findTargetModule? mod self = HOrElse.hOrElse (self.leanExes.findSomeRev? fun (x : Lake.LeanExe) => Lake.LeanExe.isRoot? mod x) fun (x : Unit) => Lake.Package.findModule? mod self