Equations
- Lake.Job.instPure = { pure := fun {α : Type u_1} => Lake.Job.pure }
@[inline]
def
Lake.Job.mapResult
{α : Type u_1}
{β : Type u_2}
(f : Lake.JobResult α → Lake.JobResult β)
(self : Lake.Job α)
(prio : optParam Task.Priority Task.Priority.default)
(sync : optParam Bool false)
:
Lake.Job β
Equations
- Lake.Job.mapResult f self prio sync = { task := Task.map f self.task prio sync }
Instances For
@[inline]
def
Lake.Job.map
{α : Type u_1}
{β : Type u_2}
(f : α → β)
(self : Lake.Job α)
(prio : optParam Task.Priority Task.Priority.default)
(sync : optParam Bool false)
:
Lake.Job β
Equations
- Lake.Job.map f self prio sync = Lake.Job.mapResult (fun (x : Lake.JobResult α) => Lake.EResult.map f x) self prio sync
Instances For
Equations
- One or more equations did not get rendered due to their size.
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lake.Job.async
{α : Type}
(act : Lake.JobM α)
(prio : optParam Task.Priority Task.Priority.default)
:
Lake.SpawnM (Lake.Job α)
Spawn a job that asynchronously performs act
.
Equations
- Lake.Job.async act prio ctx = Lake.Job.mk <$> (act ctx ∅).asTask prio
Instances For
@[inline]
Wait a the job to complete and return the result.
Instances For
@[inline]
Wait for a job to complete and return the produced value.
If an error occurred, return none
and discarded any logs produced.
Equations
- self.wait? = do let __do_lift ← self.wait pure (Lake.EResult.result? __do_lift)
Instances For
@[inline]
Wait for a job to complete and return the produced value. Logs the job's log and throws if there was an error.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lake.Job.bindSync
{α : Type u_1}
{β : Type}
(self : Lake.Job α)
(f : α → Lake.JobM β)
(prio : optParam Task.Priority Task.Priority.default)
(sync : optParam Bool false)
:
Lake.SpawnM (Lake.Job β)
let c ← a.bindSync b
asynchronously performs the action b
after the job a
completes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lake.Job.bindAsync
{α : Type u_1}
{β : Type}
(self : Lake.Job α)
(f : α → Lake.SpawnM (Lake.Job β))
(prio : optParam Task.Priority Task.Priority.default)
(sync : optParam Bool false)
:
Lake.SpawnM (Lake.Job β)
let c ← a.bindAsync b
asynchronously performs the action b
after the job a
completes and then merges into the job produced by b
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lake.Job.zipWith
{α : Type u_1}
{β : Type u_2}
{γ : Type}
(f : α → β → γ)
(x : Lake.Job α)
(y : Lake.Job β)
(prio : optParam Task.Priority Task.Priority.default)
(sync : optParam Bool false)
:
a.zipWith f b
produces a new job c
that applies f
to the
results of a
and b
. The job c
errors if either a
or b
error.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lake.withRegisterJob
{m : Type → Type u_1}
{α : Type}
[Monad m]
[MonadReaderOf Lake.BuildContext m]
[MonadLiftT BaseIO m]
(caption : String)
(x : m (Lake.Job α))
:
m (Lake.Job α)
Register the produced job for the CLI progress UI.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
A Lake build job.
Equations
- Lake.BuildJob α = Lake.Job (α × Lake.BuildTrace)
Instances For
@[inline]
Equations
- Lake.BuildJob.ofJob self = Lake.BuildJob.mk ((fun (x : Lake.BuildTrace) => ((), x)) <$> self)
Instances For
Equations
- Lake.BuildJob.instPure = { pure := fun {α : Type u_1} => Lake.BuildJob.pure }
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- Lake.BuildJob.map f self = Lake.BuildJob.mk ((fun (x : α × Lake.BuildTrace) => match x with | (a, t) => (f a, t)) <$> self.toJob)
Instances For
Equations
- Lake.BuildJob.instFunctor = { map := fun {α β : Type u_1} => Lake.BuildJob.map, mapConst := fun {α β : Type u_1} => Lake.BuildJob.map ∘ Function.const β }
@[inline]
def
Lake.BuildJob.mapWithTrace
{α : Type u_1}
{β : Type u_1}
(f : α → Lake.BuildTrace → β × Lake.BuildTrace)
(self : Lake.BuildJob α)
:
Equations
- Lake.BuildJob.mapWithTrace f self = Lake.BuildJob.mk ((fun (x : α × Lake.BuildTrace) => match x with | (a, t) => f a t) <$> self.toJob)
Instances For
@[inline]
def
Lake.BuildJob.bindSync
{α : Type u_1}
{β : Type}
(self : Lake.BuildJob α)
(f : α → Lake.BuildTrace → Lake.JobM β)
(prio : optParam Task.Priority Task.Priority.default)
(sync : optParam Bool false)
:
Lake.SpawnM (Lake.Job β)
Equations
- self.bindSync f prio sync = self.toJob.bindSync (fun (x : α × Lake.BuildTrace) => match x with | (a, t) => f a t) prio sync
Instances For
@[inline]
def
Lake.BuildJob.bindAsync
{α : Type u_1}
{β : Type}
(self : Lake.BuildJob α)
(f : α → Lake.BuildTrace → Lake.SpawnM (Lake.Job β))
(prio : optParam Task.Priority Task.Priority.default)
(sync : optParam Bool false)
:
Lake.SpawnM (Lake.Job β)
Equations
- self.bindAsync f prio sync = self.toJob.bindAsync (fun (x : α × Lake.BuildTrace) => match x with | (a, t) => f a t) prio sync
Instances For
@[inline]
Equations
- self.wait? = (fun (x : Option (α × Lake.BuildTrace)) => Option.map (fun (x : α × Lake.BuildTrace) => x.fst) x) <$> self.toJob.wait?
Instances For
def
Lake.BuildJob.add
{α : Type}
{β : Type u_1}
(t1 : Lake.BuildJob α)
(t2 : Lake.BuildJob β)
:
BaseIO (Lake.BuildJob α)
Equations
- t1.add t2 = Lake.BuildJob.mk <$> Lake.Job.zipWith (fun (a : α × Lake.BuildTrace) (x : β × Lake.BuildTrace) => a) t1.toJob t2.toJob Task.Priority.default
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
def
Lake.BuildJob.zipWith
{α : Type u_1}
{β : Type u_2}
{γ : Type}
(f : α → β → γ)
(t1 : Lake.BuildJob α)
(t2 : Lake.BuildJob β)
:
BaseIO (Lake.BuildJob γ)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lake.BuildJob.collectList
{α : Type}
(jobs : List (Lake.BuildJob α))
:
BaseIO (Lake.BuildJob (List α))
Equations
- Lake.BuildJob.collectList jobs = List.foldrM (Lake.BuildJob.zipWith List.cons) (pure []) jobs
Instances For
def
Lake.BuildJob.collectArray
{α : Type}
(jobs : Array (Lake.BuildJob α))
:
BaseIO (Lake.BuildJob (Array α))
Equations
- Lake.BuildJob.collectArray jobs = Array.foldlM (Lake.BuildJob.zipWith Array.push) (pure #[]) jobs 0