A string descriptor of the System.Platform OS (windows, macOS, or linux).
Equations
- Lake.osDescriptor = if System.Platform.isWindows = true then "windows" else if System.Platform.isOSX = true then "macOS" else "linux"
Instances For
A tar.gz file name suffix encoding the the current Platform.
(i.e, osDescriptor joined with System.Platform.numBits).
Equations
- Lake.archiveSuffix = toString "" ++ toString Lake.osDescriptor ++ toString "-" ++ toString System.Platform.numBits ++ toString ".tar.gz"
Instances For
If name?, {name}-{archiveSuffix}, otherwise just archiveSuffix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
First tries to convert a string into a legal name.
If that fails, defaults to making it a simple name (e.g., Lean.Name.mkSimple).
Currently used for package and target names taken from the CLI.
Equations
- Lake.stringToLegalOrSimpleName s = if Lean.Name.isAnonymous (String.toName s) = true then Lean.Name.mkSimple s else String.toName s
Instances For
Defaults #
The default setting for a PackageConfig's manifestFile option.
Equations
- Lake.defaultManifestFile = "lake-manifest.json"
Instances For
The default setting for a PackageConfig's buildDir option.
Equations
- Lake.defaultBuildDir = { toString := "build" }
Instances For
The default setting for a PackageConfig's leanLibDir option.
Equations
- Lake.defaultLeanLibDir = { toString := "lib" }
Instances For
The default setting for a PackageConfig's nativeLibDir option.
Equations
- Lake.defaultNativeLibDir = { toString := "lib" }
Instances For
The default setting for a PackageConfig's binDir option.
Equations
- Lake.defaultBinDir = { toString := "bin" }
Instances For
The default setting for a PackageConfig's irDir option.
Equations
- Lake.defaultIrDir = { toString := "ir" }
Instances For
PackageConfig #
- packagesDir : Lake.FilePath
- buildType : Lake.BuildType
- name : Lake.Name
The
Nameof the package. - manifestFile : String
The path of a package's manifest file, which stores the exact versions of its resolved dependencies.
Defaults to
defaultManifestFile(i.e.,lake-manifest.json). An
Arrayof target names to build whenever the package is used.- precompileModules : Bool
Whether to compile each of the package's module into a native shared library that is loaded whenever the module is imported. This speeds up evaluation of metaprograms and enables the interpreter to run functions marked
@[extern].Defaults to
false. Additional arguments to pass to the Lean language server (i.e.,
lean --server) launched bylake server.- srcDir : Lake.FilePath
The directory containing the package's Lean source files. Defaults to the package's directory.
(This will be passed to
leanas the-Roption.) - buildDir : Lake.FilePath
The directory to which Lake should output the package's build results. Defaults to
defaultBuildDir(i.e.,build). - leanLibDir : Lake.FilePath
The build subdirectory to which Lake should output the package's binary Lean libraries (e.g.,
.olean,.ileanfiles). Defaults todefaultLeanLibDir(i.e.,lib). - nativeLibDir : Lake.FilePath
The build subdirectory to which Lake should output the package's native libraries (e.g.,
.a,.so,.dllfiles). Defaults todefaultNativeLibDir(i.e.,lib). - binDir : Lake.FilePath
The build subdirectory to which Lake should output the package's binary executable. Defaults to
defaultBinDir(i.e.,bin). - irDir : Lake.FilePath
The build subdirectory to which Lake should output the package's intermediary results (e.g.,
.cand.ofiles). Defaults todefaultIrDir(i.e.,ir). The URL of the GitHub repository to upload and download releases of this package. If
none(the default), for downloads, Lake uses the URL the package was download from (if it is a dependency) and for uploads, usesgh's default.The name of the build archive on GitHub. Defaults to
none. The archive's full file name will benameToArchive buildArchive?.- preferReleaseBuild : Bool
Whether to prefer downloading a prebuilt release (from GitHub) rather than building this package from the source when this package is used as a dependency.
A Package's declarative configuration.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Package #
- dir : Lake.FilePath
The path to the package's directory.
- config : Lake.PackageConfig
The package's user-defined configuration.
- configEnv : Lean.Environment
The elaboration environment of the package's configuration file.
- leanOpts : Lean.Options
The Lean
Optionsthe package configuration was elaborated with. The URL to this package's Git remote.
The Git tag of this package.
- opaqueDeps : Array Lake.OpaquePackage
(Opaque references to) the package's direct dependencies.
- leanLibConfigs : Lake.OrdNameMap Lake.LeanLibConfig
Lean library configurations for the package.
- leanExeConfigs : Lake.OrdNameMap Lake.LeanExeConfig
Lean binary executable configurations for the package.
- externLibConfigs : Lake.DNameMap (Lake.ExternLibConfig s.config.name)
External library targets for the package.
- opaqueTargetConfigs : Lake.DNameMap (Lake.OpaqueTargetConfig s.config.name)
(Opaque references to) targets defined in the package.
The names of the package's targets to build by default (i.e., on a bare
lake buildof the package).- scripts : Lake.NameMap Lake.Script
Scripts for the package.
- defaultScripts : Array Lake.Script
The names of the package's scripts run by default (i.e., on a bare
lake runof the package).
A Lake package -- its location plus its configuration.
Instances For
Equations
- Lake.OpaquePackage.instInhabitedOpaquePackage = { default := Lake.OpaquePackage.mk default }
Equations
- Lake.OpaquePackage.unsafeMk = unsafeCast
Instances For
Equations
- Lake.OpaquePackage.unsafeGet = unsafeCast
Instances For
Equations
- Lake.instHashablePackage = { hash := fun pkg => hash pkg.config.name }
Equations
- Lake.instBEqPackage = { beq := fun p1 p2 => p1.config.name == p2.config.name }
Equations
Instances For
Equations
Instances For
The package's name.
Equations
- Lake.Package.name self = self.config.name
Instances For
- dir : Lake.FilePath
- config : Lake.PackageConfig
- configEnv : Lean.Environment
- leanOpts : Lean.Options
- opaqueDeps : Array Lake.OpaquePackage
- leanLibConfigs : Lake.OrdNameMap Lake.LeanLibConfig
- leanExeConfigs : Lake.OrdNameMap Lake.LeanExeConfig
- externLibConfigs : Lake.DNameMap (Lake.ExternLibConfig s.toPackage.config.name)
- opaqueTargetConfigs : Lake.DNameMap (Lake.OpaqueTargetConfig s.toPackage.config.name)
- scripts : Lake.NameMap Lake.Script
- defaultScripts : Array Lake.Script
- name_eq : Lake.Package.name s.toPackage = name
A package with a name known at type-level.
Instances For
Equations
- Lake.instCoeOutNPackagePackage = { coe := Lake.NPackage.toPackage }
Equations
- Lake.instCoeDepPackageNPackageName = { coe := { toPackage := pkg, name_eq := (_ : Lake.Package.name pkg = Lake.Package.name pkg) } }
The package's direct dependencies.
Equations
- Lake.Package.deps self = Array.map (fun x => Lake.OpaquePackage.get x) self.opaqueDeps
Instances For
The path for storing the package's remote dependencies relative to dir (i.e., packagesDir).
Equations
- Lake.Package.relPkgsDir self = self.config.toWorkspaceConfig.packagesDir
Instances For
The package's dir joined with its relPkgsDir
Equations
- Lake.Package.pkgsDir self = self.dir / Lake.Package.relPkgsDir self
Instances For
The package's JSON manifest of remote dependencies.
Equations
- Lake.Package.manifestFile self = self.dir / { toString := self.config.manifestFile }
Instances For
The package's dir joined with its buildDir configuration.
Equations
- Lake.Package.buildDir self = self.dir / self.config.buildDir
Instances For
The package's extraDepTargets configuration.
Equations
- Lake.Package.extraDepTargets self = self.config.extraDepTargets
Instances For
The package's releaseRepo? configuration.
Equations
- Lake.Package.releaseRepo? self = self.config.releaseRepo?
Instances For
The package's URL × tag release.
Tries releaseRepo? first and then falls back to remoteUrl?.
Equations
- Lake.Package.release? self = do let url ← HOrElse.hOrElse (Lake.Package.releaseRepo? self) fun x => self.remoteUrl? let tag ← self.gitTag? pure (url, tag)
Instances For
The package's buildArchive? configuration.
Equations
- Lake.Package.buildArchive? self = self.config.buildArchive?
Instances For
The file name of the package's build archive derived from buildArchive?.
Equations
Instances For
The package's buildDir joined with its buildArchive configuration.
Equations
- Lake.Package.buildArchiveFile self = Lake.Package.buildDir self / { toString := Lake.Package.buildArchive self }
Instances For
The package's preferReleaseBuild configuration.
Equations
- Lake.Package.preferReleaseBuild self = self.config.preferReleaseBuild
Instances For
The package's precompileModules configuration.
Equations
- Lake.Package.precompileModules self = self.config.precompileModules
Instances For
The package's moreServerArgs configuration.
Equations
- Lake.Package.moreServerArgs self = self.config.moreServerArgs
Instances For
The package's buildType configuration.
Equations
- Lake.Package.buildType self = self.config.toLeanConfig.buildType
Instances For
The package's moreLeanArgs configuration.
Equations
- Lake.Package.moreLeanArgs self = self.config.toLeanConfig.moreLeanArgs
Instances For
The package's weakLeanArgs configuration.
Equations
- Lake.Package.weakLeanArgs self = self.config.toLeanConfig.weakLeanArgs
Instances For
The package's moreLeancArgs configuration.
Equations
- Lake.Package.moreLeancArgs self = self.config.toLeanConfig.moreLeancArgs
Instances For
The package's weakLeancArgs configuration.
Equations
- Lake.Package.weakLeancArgs self = self.config.toLeanConfig.weakLeancArgs
Instances For
The package's moreLinkArgs configuration.
Equations
- Lake.Package.moreLinkArgs self = self.config.toLeanConfig.moreLinkArgs
Instances For
The package's weakLinkArgs configuration.
Equations
- Lake.Package.weakLinkArgs self = self.config.toLeanConfig.weakLinkArgs
Instances For
The package's dir joined with its srcDir configuration.
Equations
- Lake.Package.srcDir self = self.dir / self.config.srcDir
Instances For
The package's root directory for lean (i.e., srcDir).
Equations
- Lake.Package.rootDir self = Lake.Package.srcDir self
Instances For
The package's buildDir joined with its leanLibDir configuration.
Equations
- Lake.Package.leanLibDir self = Lake.Package.buildDir self / self.config.leanLibDir
Instances For
The package's buildDir joined with its nativeLibDir configuration.
Equations
- Lake.Package.nativeLibDir self = Lake.Package.buildDir self / self.config.nativeLibDir
Instances For
The package's buildDir joined with its binDir configuration.
Equations
- Lake.Package.binDir self = Lake.Package.buildDir self / self.config.binDir
Instances For
The package's buildDir joined with its irDir configuration.
Equations
- Lake.Package.irDir self = Lake.Package.buildDir self / self.config.irDir
Instances For
Whether the given module is considered local to the package.
Equations
- Lake.Package.isLocalModule mod self = Lake.RBArray.any (fun lib => Lake.LeanLibConfig.isLocalModule mod lib) self.leanLibConfigs
Instances For
Whether the given module is in the package (i.e., can build it).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Remove the package's build outputs (i.e., delete its build directory).
Equations
- One or more equations did not get rendered due to their size.