Equations
- Lake.instReprBackend.repr Lake.Backend.c prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Lake.Backend.c")).group prec✝
- Lake.instReprBackend.repr Lake.Backend.llvm prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Lake.Backend.llvm")).group prec✝
- Lake.instReprBackend.repr Lake.Backend.default prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Lake.Backend.default")).group prec✝
Instances For
Equations
- Lake.instReprBackend = { reprPrec := Lake.instReprBackend.repr }
Equations
- Lake.Backend.instInhabited = { default := Lake.Backend.default }
Equations
Instances For
Equations
- Lake.Backend.c.toString = "c"
- Lake.Backend.llvm.toString = "llvm"
- Lake.Backend.default.toString = "default"
Instances For
If the left backend is default, choose the right one.
Otherwise, keep the left one.
This is used to implement preferential choice of backends,
where the library config can refine the package config.
Formally, a left absorbing monoid on {C, LLVM} with Default as the unit.
Equations
- Lake.Backend.default.orPreferLeft x✝ = x✝
- x✝¹.orPreferLeft x✝ = x✝¹
Instances For
Lake equivalent of CMake's
CMAKE_BUILD_TYPE.
- debug : BuildTypeDebug optimization, asserts enabled, custom debug code enabled, and debug info included in executable (so you can step through the code with a debugger and have address to source-file:line-number translation). For example, passes -Og -gwhen compiling C code.
- relWithDebInfo : BuildTypeOptimized, with debug info, but no debug code or asserts (e.g., passes -O3 -g -DNDEBUGwhen compiling C code).
- minSizeRel : BuildTypeSame as releasebut optimizing for size rather than speed (e.g., passes-Os -DNDEBUGwhen compiling C code).
- release : BuildTypeHigh optimization level and no debug info, code, or asserts (e.g., passes -O3 -DNDEBUGwhen compiling C code).
Instances For
Equations
Instances For
Equations
- Lake.instReprBuildType = { reprPrec := Lake.instReprBuildType.repr }
Equations
- One or more equations did not get rendered due to their size.
- Lake.instReprBuildType.repr Lake.BuildType.debug prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Lake.BuildType.debug")).group prec✝
- Lake.instReprBuildType.repr Lake.BuildType.minSizeRel prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Lake.BuildType.minSizeRel")).group prec✝
- Lake.instReprBuildType.repr Lake.BuildType.release prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Lake.BuildType.release")).group prec✝
Instances For
Equations
- Lake.instOrdBuildType.ord x✝ y✝ = compare x✝.ctorIdx y✝.ctorIdx
Instances For
Equations
- Lake.instOrdBuildType = { compare := Lake.instOrdBuildType.ord }
Ordering on build types. The ordering is used to determine the minimum build version that is necessary for a build.
Equations
The arguments to pass to leanc based on the build type.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.BuildType.debug.toString = "debug"
- Lake.BuildType.relWithDebInfo.toString = "relWithDebInfo"
- Lake.BuildType.minSizeRel.toString = "minSizeRel"
- Lake.BuildType.release.toString = "release"
Instances For
Equations
- Lake.BuildType.instToString = { toString := Lake.BuildType.toString }
The options to pass to lean based on the build type.
Equations
- Lake.BuildType.debug.leanOptions = { values := Lake.NameMap.empty.insert `debugAssertions (Lean.LeanOptionValue.ofBool true) }
- x✝.leanOptions = ∅
Instances For
Configuration options common to targets that build modules.
- buildType : BuildType
- leanOptions : Array LeanOptionAn Arrayof additional options to pass to both the Lean language server (i.e.,lean --server) launched bylake serveand toleanwhen compiling a module's Lean source files.
- Additional arguments to pass to - leanwhen compiling a module's Lean source files.
- Additional arguments to pass to - leanwhen compiling a module's Lean source files.- Unlike - moreLeanArgs, these arguments do not affect the trace of the build result, so they can be changed without triggering a rebuild. They come before- moreLeanArgs.
- Additional arguments to pass to - leancwhen compiling a module's C source files generated by- lean.- Lake already passes some flags based on the - buildType, but you can change this by, for example, adding- -O0and- -UNDEBUG.
- moreServerOptions : Array LeanOptionAdditional options to pass to the Lean language server (i.e., lean --server) launched bylake serve.
- Additional arguments to pass to - leancwhen compiling a module's C source files generated by- lean.- Unlike - moreLeancArgs, these arguments do not affect the trace of the build result, so they can be changed without triggering a rebuild. They come before- moreLeancArgs.
- moreLinkObjs : TargetArray System.FilePathAdditional target objects to use when linking (both static and shared). These will come after the paths of native facets. 
- moreLinkLibs : TargetArray DynlibAdditional target libraries to pass to leancwhen linking (e.g., for shared libraries or binary executables). These will come after the paths of other link objects.
- Additional arguments to pass to - leancwhen linking (e.g., for shared libraries or binary executables). These will come after the paths of the linked objects.
- Additional arguments to pass to - leancwhen linking (e.g., for shared libraries or binary executables). These will come after the paths of the linked objects.- Unlike - moreLinkArgs, these arguments do not affect the trace of the build result, so they can be changed without triggering a rebuild. They come before- moreLinkArgs.
- backend : BackendCompiler backend that modules should be built using (e.g., C,LLVM). Defaults toC.
- Asserts whether Lake should assume Lean modules are platform-independent. - If - false, Lake will add- System.Platform.targetto the module traces within the code unit (e.g., package or library). This will force Lean code to be re-elaborated on different platforms.
- If - true, Lake will exclude platform-dependent elements (e.g., precompiled modules, external libraries) from a module's trace, preventing re-elaboration on different platforms. Note that this will not effect modules outside the code unit in question. For example, a platform-independent package which depends on a platform-dependent library will still be platform-dependent.
- If - none, Lake will construct traces as natural. That is, it will include platform-dependent artifacts in the trace if they module depends on them, but otherwise not force modules to be platform-dependent.
 - There is no check for correctness here, so a configuration can lie and Lake will not catch it. Defaults to - none.
- dynlibs : TargetArray Dynlib
- plugins : TargetArray Dynlib
Instances For
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
- Lake.LeanConfig.backend.instConfigField = { toConfigProj := Lake.LeanConfig.backend._proj }
Equations
- Lake.LeanConfig.leanOptions.instConfigField = { toConfigProj := Lake.LeanConfig.leanOptions._proj }
Equations
Equations
Equations
Equations
- Lake.LeanConfig.buildType.instConfigField = { toConfigProj := Lake.LeanConfig.buildType._proj }
Equations
- Lake.LeanConfig.dynlibs.instConfigField = { toConfigProj := Lake.LeanConfig.dynlibs._proj }
Equations
- Lake.LeanConfig.instConfigInfo = { fields := Lake.LeanConfig._fields, arity := 0 }
Equations
- Lake.LeanConfig.plugins.instConfigField = { toConfigProj := Lake.LeanConfig.plugins._proj }
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.instReprLeanConfig = { reprPrec := Lake.instReprLeanConfig.repr }