Build Target Specifiers #
@[inline]
def
Lake.mkBuildSpec
{α : Type}
(info : BuildInfo)
[FormatQuery α]
[h : FamilyOut BuildData info.key α]
:
Equations
- Lake.mkBuildSpec info = { info := info, buildable := true, format := Eq.rec (motive := fun (x : Type) (h : α = x) => Lake.OutFormat → x → String) Lake.formatQuery ⋯ }
Instances For
@[inline]
Equations
- self.query fmt = Lake.maybeRegisterJob self.info.key.toSimpleString =<< do let __do_lift ← self.info.fetch pure (Lake.Job.map (self.format fmt) __do_lift)
Instances For
Equations
- Lake.buildSpecs specs = do let __do_lift ← Array.mapM (fun (x : Lake.BuildSpec) => x.build) specs pure (Lake.Job.mixArray __do_lift)
Instances For
Equations
- Lake.querySpecs specs fmt = do let __do_lift ← Array.mapM (fun (x : Lake.BuildSpec) => x.query fmt) specs pure (Lake.Job.collectArray __do_lift)
Instances For
Parsing CLI Build Target Specifiers #
def
Lake.resolveLibTarget
(ws : Workspace)
(lib : LeanLib)
(facet : Lean.Name := Lean.Name.anonymous)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.resolveExeTarget exe facet = if (facet.isAnonymous || facet == `exe) = true then pure (Lake.mkBuildSpec exe.exe) else throw (Lake.CliError.unknownFacet "executable" facet)
Instances For
def
Lake.resolveCustomTarget
(pkg : Package)
(name facet : Lean.Name)
(config : TargetConfig pkg.name name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.resolveDefaultPackageTarget ws pkg = Array.flatMapM (fun (x : Lean.Name) => Lake.resolveTargetInPackage ws pkg x Lean.Name.anonymous) pkg.defaultTargets