File: .lake/packages/lean4/src/lean/lake/Lake/Build/Job.lean

full_name: Lake.instOrdJobAction
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: Ord Lake.JobAction

full_name: Lake.JobAction.unknown
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: Lake.JobAction

full_name: Lake.instInhabitedJobAction
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: Inhabited Lake.JobAction

full_name: Lake.JobAction
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: Type

full_name: Lake.JobAction.build
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: Lake.JobAction

full_name: Lake.JobAction.fetch
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: Lake.JobAction

full_name: Lake.JobAction.replay
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: Lake.JobAction

full_name: Lake.instDecidableEqJobAction
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: DecidableEq Lake.JobAction

full_name: Lake.instReprJobAction
code: /-- Information on what this job did. -/
inductive JobAction
/-- No information about this job's action is available. -/
| unknown
/-- Tried to replay a cached build action (set by `buildFileUnlessUpToDate`) -/
| replay
/-- Tried to fetch a build from a store (can be set by `buildUnlessUpToDate?`) -/
| fetch
/-- Tried to perform a build action (set by `buildUnlessUpToDate?`) -/
| build
deriving Inhabited, Repr, DecidableEq, Ord
goal: Repr Lake.JobAction

full_name: Lake.instLTJobAction
code: instance : LT JobAction 
goal: LT Lake.JobAction

full_name: Lake.instLEJobAction
code: instance : LE JobAction 
goal: LE Lake.JobAction

full_name: Lake.instMinJobAction
code: instance : Min JobAction 
goal: Min Lake.JobAction

full_name: Lake.instMaxJobAction
code: instance : Max JobAction 
goal: Max Lake.JobAction

full_name: Lake.JobAction.merge
code: @[inline] def JobAction.merge (a b : JobAction) : JobAction 
goal: Lake.JobAction

full_name: Lake.JobAction.verb
code: def JobAction.verb (failed : Bool) : JobAction → String

goal: Lake.JobAction → String

full_name: Lake.JobState
code: /-- Mutable state of a Lake job. -/
structure JobState where
  /-- The job's log. -/
  log : Log := {}
  /-- Tracks whether this job performed any significant build action. -/
  action : JobAction := .unknown
  deriving Inhabited
goal: Type

full_name: Lake.JobState.log
code: /-- Mutable state of a Lake job. -/
structure JobState where
  /-- The job's log. -/
  log : Log := {}
  /-- Tracks whether this job performed any significant build action. -/
  action : JobAction := .unknown
  deriving Inhabited
goal: Lake.Log

full_name: Lake.instInhabitedJobState
code: /-- Mutable state of a Lake job. -/
structure JobState where
  /-- The job's log. -/
  log : Log := {}
  /-- Tracks whether this job performed any significant build action. -/
  action : JobAction := .unknown
  deriving Inhabited
goal: Inhabited Lake.JobState

full_name: Lake.JobState.action
code: /-- Mutable state of a Lake job. -/
structure JobState where
  /-- The job's log. -/
  log : Log := {}
  /-- Tracks whether this job performed any significant build action. -/
  action : JobAction := .unknown
  deriving Inhabited
goal: Lake.JobAction

full_name: Lake.JobState.renew
code: /--
Resets the job state after a checkpoint (e.g., registering the job).
Preserves state that downstream jobs want to depend on while resetting
job-local state that should not be inherited by downstream jobs.
-/
@[inline] def JobState.renew (_ : JobState) : JobState 
goal: Lake.JobState → Lake.JobState

full_name: Lake.JobState.merge
code: def JobState.merge (a b : JobState) : JobState 
goal: Lake.JobState

full_name: Lake.JobState.modifyLog
code: @[inline] def JobState.modifyLog (f : Log → Log) (s : JobState) 
goal: Lake.JobState

full_name: Lake.JobResult
code: /-- The result of a Lake job. -/
abbrev JobResult α 
goal: Type u_1

full_name: Lake.JobTask
code: /-- The `Task` of a Lake job. -/
abbrev JobTask α 
goal: Type u_1

full_name: Lake.JobM
code: /--
The monad of asynchronous Lake jobs.

While this can be lifted into `FetchM`, job action should generally
be wrapped into an asynchronous job (e.g., via `Job.async`) instead of being
run directly in `FetchM`.
-/
abbrev JobM 
goal: Type

full_name: Lake.«instMonadLiftLakeMBuildTOfPure_.lake»
code: instance [Pure m] : MonadLift LakeM (BuildT m) 
goal: MonadLift Lake.LakeM (Lake.BuildT m)

full_name: Lake.instMonadStateOfLogJobM
code: instance : MonadStateOf Log JobM 
goal: MonadStateOf Lake.Log Lake.JobM

full_name: Lake.instMonadStateOfJobStateJobM
code: instance : MonadStateOf JobState JobM 
goal: MonadStateOf Lake.JobState Lake.JobM

full_name: Lake.instMonadLogJobM
code: instance : MonadLog JobM 
goal: Lake.MonadLog Lake.JobM

full_name: Lake.instMonadErrorJobM
code: instance : MonadError JobM 
goal: Lake.MonadError Lake.JobM

full_name: Lake.instAlternativeJobM
code: instance : Alternative JobM 
goal: Alternative Lake.JobM

full_name: Lake.instMonadLiftLogIOJobM
code: instance : MonadLift LogIO JobM 
goal: MonadLift Lake.LogIO Lake.JobM

full_name: Lake.updateAction
code: /-- Record that this job is trying to perform some action. -/
@[inline] def updateAction (action : JobAction) : JobM PUnit 
goal: Lake.JobM PUnit

full_name: Lake.SpawnM
code: /-- The monad used to spawn asynchronous Lake build jobs. Lifts into `FetchM`. -/
abbrev SpawnM 
goal: Type

full_name: Lake.SchedulerM
code: /-- The monad used to spawn asynchronous Lake build jobs. **Replaced by `SpawnM`.** -/
@[deprecated SpawnM] abbrev SchedulerM 
goal: Type

full_name: Lake.Job
code: /-- A Lake job. -/
structure Job (α : Type u)  where
  task : JobTask α
  caption : String
  deriving Inhabited
goal: Type u

full_name: Lake.Job.caption
code: /-- A Lake job. -/
structure Job (α : Type u)  where
  task : JobTask α
  caption : String
  deriving Inhabited
goal: String

full_name: Lake.Job.task
code: /-- A Lake job. -/
structure Job (α : Type u)  where
  task : JobTask α
  caption : String
  deriving Inhabited
goal: Lake.JobTask α

full_name: Lake.instInhabitedJob
code: /-- A Lake job. -/
structure Job (α : Type u)  where
  task : JobTask α
  caption : String
  deriving Inhabited
goal: {a : Type u_1} → Inhabited (Lake.Job a)

full_name: Lake.instInhabitedBundledJob
code: structure BundledJob where
  {type : Type u}
  job : Job type
  deriving Inhabited
goal: Inhabited Lake.BundledJob

full_name: Lake.BundledJob.type
code: structure BundledJob where
  {type : Type u}
  job : Job type
  deriving Inhabited
goal: Type u

full_name: Lake.BundledJob
code: structure BundledJob where
  {type : Type u}
  job : Job type
  deriving Inhabited
goal: Type (u + 1)

full_name: Lake.BundledJob.job
code: structure BundledJob where
  {type : Type u}
  job : Job type
  deriving Inhabited
goal: Lake.Job self.type

full_name: Lake.instCoeOutJobBundledJob
code: instance : CoeOut (Job α) BundledJob 
goal: CoeOut (Lake.Job α) Lake.BundledJob

full_name: Lake.OpaqueJob.instCoeBundledJob
code: hydrate_opaque_type OpaqueJob BundledJob
goal: Coe Lake.BundledJob Lake.OpaqueJob

full_name: Lake.OpaqueJob.instInhabitedOfBundledJob
code: hydrate_opaque_type OpaqueJob BundledJob
goal: Inhabited Lake.OpaqueJob

full_name: Lake.OpaqueJob.instCoeBundledJob_1
code: hydrate_opaque_type OpaqueJob BundledJob
goal: Coe Lake.OpaqueJob Lake.BundledJob

full_name: Lake.OpaqueJob.type
code: abbrev OpaqueJob.type (job : OpaqueJob) : Type 
goal: Type

full_name: Lake.OpaqueJob.toJob
code: abbrev OpaqueJob.toJob (job : OpaqueJob) : Job job.type 
goal: Lake.Job job.type

full_name: Lake.OpaqueJob.task
code: abbrev OpaqueJob.task (job : OpaqueJob) : JobTask job.type 
goal: Lake.JobTask job.type

full_name: Lake.OpaqueJob.caption
code: abbrev OpaqueJob.caption (job : OpaqueJob) : String 
goal: String

full_name: Lake.instCoeDepOpaqueJobJobType
code: instance : CoeDep OpaqueJob job (Job job.type) 
goal: CoeDep Lake.OpaqueJob job (Lake.Job job.type)

full_name: Lake.Job.ofTask
code: @[inline] def ofTask (task : JobTask α) (caption := "") : Job α 
goal: Lake.Job α

full_name: Lake.Job.error
code: @[inline] protected def error (log : Log := {}) (caption := "") : Job α 
goal: Lake.Job α

full_name: Lake.Job.pure
code: @[inline] protected def pure (a : α) (log : Log := {}) (caption := "") : Job α 
goal: Lake.Job α

full_name: Lake.Job.instPure
code: instance : Pure Job 
goal: Pure Lake.Job

full_name: Lake.Job.instInhabited
code: instance [Inhabited α] : Inhabited (Job α) 
goal: Inhabited (Lake.Job α)

full_name: Lake.Job.nop
code: @[inline] protected def nop (log : Log := {}) (caption := "") : Job Unit 
goal: Lake.Job Unit

full_name: Lake.Job.setCaption
code: /-- Sets the job's caption. -/
@[inline] def setCaption (caption : String) (job : Job α) : Job α 
goal: Lake.Job α

full_name: Lake.Job.setCaption?
code: /-- Sets the job's caption if the job's current caption is empty. -/
@[inline] def setCaption? (caption : String) (job : Job α) : Job α 
goal: Lake.Job α

full_name: Lake.Job.mapResult
code: @[inline] def mapResult
  (f : JobResult α → JobResult β) (self : Job α)
  (prio := Task.Priority.default) (sync := false)
: Job β 
goal: Lake.Job β

full_name: Lake.Job.bindTask
code: @[inline] def bindTask [Monad m]
  (f : JobTask α → m (JobTask β)) (self : Job α)
: m (Job β) 
goal: m (Lake.Job β)

full_name: Lake.Job.map
code: @[inline] protected def map
  (f : α → β) (self : Job α)
  (prio := Task.Priority.default) (sync := false)
: Job β 
goal: Lake.Job β

full_name: Lake.Job.instFunctor
code: instance : Functor Job 
goal: Functor Lake.Job

full_name: Lake.Job.renew
code: /--
Resets the job's state after a checkpoint (e.g., registering the job).
Preserves information that downstream jobs want to depend on while resetting
job-local information that should not be inherited by downstream jobs.
-/
def renew (self : Job α) : Job α 
goal: Lake.Job α

full_name: Lake.Job.async
code: /-- Spawn a job that asynchronously performs `act`. -/
@[inline] protected def async
  (act : JobM α) (prio := Task.Priority.default)
: SpawnM (Job α) 
goal: Lake.SpawnM (Lake.Job α)

full_name: Lake.Job.wait
code: /-- Wait a the job to complete and return the result. -/
@[inline] protected def wait (self : Job α) : BaseIO (JobResult α) 
goal: BaseIO (Lake.JobResult α)

full_name: Lake.Job.wait?
code: /--
Wait for a job to complete and return the produced value.
If an error occurred, return `none` and discarded any logs produced.
-/
@[inline] protected def wait? (self : Job α) : BaseIO (Option α) 
goal: BaseIO (Option α)

full_name: Lake.Job.await
code: /--
Wait for a job to complete and return the produced value.
Logs the job's log and throws if there was an error.
-/
@[inline] protected def await (self : Job α) : LogIO α 
goal: Lake.LogIO α

full_name: Lake.Job.bindSync
code: /--
`let c ← a.bindSync b` asynchronously performs the action `b`
after the job `a` completes.
-/
@[inline] protected def bindSync
  (self : Job α) (f : α → JobM β)
  (prio := Task.Priority.default) (sync := false)
: SpawnM (Job β) 
goal: Lake.SpawnM (Lake.Job β)

full_name: Lake.Job.bindAsync
code: /--
`let c ← a.bindAsync b` asynchronously performs the action `b`
after the job `a` completes and then merges into the job produced by `b`.
-/
@[inline] protected def bindAsync
  (self : Job α) (f : α → SpawnM (Job β))
  (prio := Task.Priority.default) (sync := false)
: SpawnM (Job β) 
goal: Lake.SpawnM (Lake.Job β)

full_name: Lake.Job.zipWith
code: /--
`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.
-/
@[inline] def zipWith
  (f : α → β → γ) (x : Job α) (y : Job β)
  (prio := Task.Priority.default) (sync := false)
: Job γ 
goal: Lake.Job γ

full_name: Lake.BuildJob
code: /-- A Lake build job. -/
abbrev BuildJob α 
goal: Type u_1

full_name: Lake.BuildJob.mk
code: @[inline] def mk (job : Job (α × BuildTrace)) : BuildJob α 
goal: Lake.BuildJob α

full_name: Lake.BuildJob.ofJob
code: @[inline] def ofJob (self : Job BuildTrace) : BuildJob Unit 
goal: Lake.BuildJob Unit

full_name: Lake.BuildJob.toJob
code: @[inline] def toJob (self : BuildJob α) : Job (α × BuildTrace) 
goal: Lake.Job (α × Lake.BuildTrace)

full_name: Lake.BuildJob.nil
code: @[inline] def nil : BuildJob Unit 
goal: Lake.BuildJob Unit

full_name: Lake.BuildJob.pure
code: @[inline] protected def pure (a : α) : BuildJob α 
goal: Lake.BuildJob α

full_name: Lake.BuildJob.instPure
code: instance : Pure BuildJob 
goal: Pure Lake.BuildJob

full_name: Lake.BuildJob.map
code: @[inline] protected def map (f : α → β) (self : BuildJob α) : BuildJob β 
goal: Lake.BuildJob β

full_name: Lake.BuildJob.instFunctor
code: instance : Functor BuildJob 
goal: Functor Lake.BuildJob

full_name: Lake.BuildJob.mapWithTrace
code: @[inline] def mapWithTrace (f : α → BuildTrace → β × BuildTrace) (self : BuildJob α) : BuildJob β 
goal: Lake.BuildJob β

full_name: Lake.BuildJob.bindSync
code: @[inline] protected def bindSync
  (self : BuildJob α) (f : α → BuildTrace → JobM β)
  (prio : Task.Priority := .default) (sync := false)
: SpawnM (Job β) 
goal: Lake.SpawnM (Lake.Job β)

full_name: Lake.BuildJob.bindAsync
code: @[inline] protected def bindAsync
  (self : BuildJob α) (f : α → BuildTrace → SpawnM (Job β))
  (prio : Task.Priority := .default) (sync := false)
 : SpawnM (Job β)  
goal: Lake.SpawnM (Lake.Job β)

full_name: Lake.BuildJob.wait?
code: @[inline] protected def wait? (self : BuildJob α) : BaseIO (Option α) 
goal: BaseIO (Option α)

full_name: Lake.BuildJob.add
code: def add (t1 : BuildJob α) (t2 : BuildJob β) : BuildJob α 
goal: Lake.BuildJob α

full_name: Lake.BuildJob.mix
code: def mix (t1 : BuildJob α) (t2 : BuildJob β) : BuildJob Unit 
goal: Lake.BuildJob Unit

full_name: Lake.BuildJob.mixList
code: def mixList (jobs : List (BuildJob α)) : Id (BuildJob Unit) 
goal: Id (Lake.BuildJob Unit)

full_name: Lake.BuildJob.mixArray
code: def mixArray (jobs : Array (BuildJob α)) : Id (BuildJob Unit) 
goal: Id (Lake.BuildJob Unit)

full_name: Lake.BuildJob.zipWith
code: def zipWith
  (f : α → β → γ) (t1 : BuildJob α) (t2 : BuildJob β)
: BuildJob γ 
goal: Lake.BuildJob γ

full_name: Lake.BuildJob.collectList
code: def collectList (jobs : List (BuildJob α)) : Id (BuildJob (List α)) 
goal: Id (Lake.BuildJob (List α))

full_name: Lake.BuildJob.collectArray
code: def collectArray (jobs : Array (BuildJob α)) : Id (BuildJob (Array α)) 
goal: Id (Lake.BuildJob (Array α))