Recursive Building #
This module defines Lake's top-level build monad, FetchM
, used
for performing recursive builds. A recursive build is a build function
which can fetch the results of other (recursive) builds. This is done
using the fetch
function defined in this module.
The internal core monad of Lake builds. Not intended for user use.
Equations
A type alias for Option Package
that assists monad type class synthesis.
Equations
Run the action x
with pkg?
as the current package or no package if none
.
Equations
- Lake.withCurrPackage? pkg? x = withReader (fun (x : Option Lake.Package) => pkg?) x
Run the action x
with pkg
as the current package.
Equations
- Lake.withCurrPackage pkg x = Lake.withCurrPackage? (some pkg) x
Get the package of the context (if any).
Equations
A recursive build of a Lake build store that may encounter a cycle.
An internal monad. Not intended for user use.
Equations
Log build cycle and error.
Equations
- Lake.buildCycleError cycle = Lake.error (toString "build cycle detected:\n" ++ toString (Lake.formatCycle cycle) ++ toString "")
Equations
- Lake.instMonadCycleOfBuildKeyRecBuildTOfMonadOfMonadError = { toMonadCallStackOf := Lake.instMonadCallStackOfOfMonadLiftOfMonadFunctor, throwCycle := fun {α : Type} => Lake.buildCycleError }
A recursive build of a Lake build store that may encounter a cycle.
An internal monad. Not intended for user use.
Equations
Run a recursive build.
Equations
- Lake.RecBuildT.run stack store build = (build none stack).run store
Run a recursive build in a fresh build store.
Equations
- build.run' = (fun (x : α × Lake.BuildStore) => x.fst) <$> Lake.RecBuildT.run ∅ ∅ build
A build function for any element of the Lake build index.
Equations
- Lake.IndexBuildFn m = ((info : Lake.BuildInfo) → m (Lake.Job (Lake.BuildData info.key)))
A transformer to equip a monad with a build function for the Lake index.
Equations
The top-level monad transformer for Lake build functions.
Equations
The top-level monad for Lake build functions.
Equations
Fetch the result of this facet of a module.
Equations
- self.fetch mod = (Lake.Module.facetCore self.name mod).fetch