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

full_name: Lake.mkBuildContext
code: /-- Create a fresh build context from a workspace and a build configuration. -/
def mkBuildContext (ws : Workspace) (config : BuildConfig) : BaseIO BuildContext 
goal: BaseIO Lake.BuildContext

full_name: Lake.Monitor.spinnerFrames
code: /-- Unicode icons that make up the spinner in animation order. -/
def Monitor.spinnerFrames 
goal: Array Char

full_name: Lake.MonitorContext.updateFrequency
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: Nat

full_name: Lake.MonitorContext.out
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: IO.FS.Stream

full_name: Lake.MonitorContext.totalJobs
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: Nat

full_name: Lake.MonitorContext.failLv
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: Lake.LogLevel

full_name: Lake.MonitorContext
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: Type

full_name: Lake.MonitorContext.outLv
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: Lake.LogLevel

full_name: Lake.MonitorContext.showProgress
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: Bool

full_name: Lake.MonitorContext.useAnsi
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: Bool

full_name: Lake.MonitorContext.minAction
code: /-- Context of the Lake build monitor. -/
structure MonitorContext where
  totalJobs : Nat
  out : IO.FS.Stream
  outLv : LogLevel
  failLv : LogLevel
  minAction : JobAction
  useAnsi : Bool
  showProgress : Bool
  /-- How often to poll jobs (in milliseconds). -/
  updateFrequency : Nat
goal: Lake.JobAction

full_name: Lake.MonitorState
code: /-- State of the Lake build monitor. -/
structure MonitorState where
  jobNo : Nat := 1
  failures : Array String
  resetCtrl : String
  lastUpdate : Nat
  spinnerIdx : Fin Monitor.spinnerFrames.size := ⟨0, by decide⟩
goal: Type

full_name: Lake.MonitorState.lastUpdate
code: /-- State of the Lake build monitor. -/
structure MonitorState where
  jobNo : Nat := 1
  failures : Array String
  resetCtrl : String
  lastUpdate : Nat
  spinnerIdx : Fin Monitor.spinnerFrames.size := ⟨0, by decide⟩
goal: Nat

full_name: Lake.MonitorState.spinnerIdx
code: /-- State of the Lake build monitor. -/
structure MonitorState where
  jobNo : Nat := 1
  failures : Array String
  resetCtrl : String
  lastUpdate : Nat
  spinnerIdx : Fin Monitor.spinnerFrames.size := ⟨0, by decide⟩
goal: Fin Lake.Monitor.spinnerFrames.size

full_name: Lake.MonitorState.jobNo
code: /-- State of the Lake build monitor. -/
structure MonitorState where
  jobNo : Nat := 1
  failures : Array String
  resetCtrl : String
  lastUpdate : Nat
  spinnerIdx : Fin Monitor.spinnerFrames.size := ⟨0, by decide⟩
goal: Nat

full_name: Lake.MonitorState.failures
code: /-- State of the Lake build monitor. -/
structure MonitorState where
  jobNo : Nat := 1
  failures : Array String
  resetCtrl : String
  lastUpdate : Nat
  spinnerIdx : Fin Monitor.spinnerFrames.size := ⟨0, by decide⟩
goal: Array String

full_name: Lake.MonitorState.resetCtrl
code: /-- State of the Lake build monitor. -/
structure MonitorState where
  jobNo : Nat := 1
  failures : Array String
  resetCtrl : String
  lastUpdate : Nat
  spinnerIdx : Fin Monitor.spinnerFrames.size := ⟨0, by decide⟩
goal: String

full_name: Lake.MonitorM
code: /-- Monad of the Lake build monitor. -/
abbrev MonitorM 
goal: Type

full_name: Lake.MonitorM.run
code: @[inline] def MonitorM.run
  (ctx : MonitorContext) (s : MonitorState) (self : MonitorM α)
: BaseIO (α × MonitorState) 
goal: BaseIO (α × Lake.MonitorState)

full_name: Lake.Ansi.resetLine
code: /--
The ANSI escape sequence for clearing the current line
and resetting the cursor back to the start.
-/
def Ansi.resetLine : String 
goal: String

full_name: Lake.flush
code: /-- Like `IO.FS.Stream.flush`, but ignores errors. -/
@[inline] def flush (out : IO.FS.Stream) : BaseIO PUnit 
goal: BaseIO PUnit

full_name: Lake.print!
code: /-- Like `IO.FS.Stream.putStr`, but panics on errors. -/
@[inline] def print! (out : IO.FS.Stream) (s : String) : BaseIO PUnit 
goal: BaseIO PUnit

full_name: Lake.Monitor.print
code: @[inline] def print (s : String) : MonitorM PUnit 
goal: Lake.MonitorM PUnit

full_name: Lake.Monitor.flush
code: @[inline] nonrec def flush : MonitorM PUnit 
goal: Lake.MonitorM PUnit

full_name: Lake.Monitor.renderProgress
code: def renderProgress (running unfinished : Array OpaqueJob) (h : 0 < unfinished.size) : MonitorM PUnit 
goal: Lake.MonitorM PUnit

full_name: Lake.Monitor.reportJob
code: def reportJob (job : OpaqueJob) : MonitorM PUnit 
goal: Lake.MonitorM PUnit

full_name: Lake.Monitor.poll
code: def poll (jobs : Array OpaqueJob): MonitorM (Array OpaqueJob × Array OpaqueJob) 
goal: Lake.MonitorM (Array Lake.OpaqueJob × Array Lake.OpaqueJob)

full_name: Lake.Monitor.sleep
code: def sleep : MonitorM PUnit 
goal: Lake.MonitorM PUnit

full_name: Lake.Monitor.loop
code: partial def loop (jobs : Array OpaqueJob) : MonitorM PUnit 
goal: Lake.MonitorM PUnit

full_name: Lake.Monitor.main
code: def main (jobs : Array OpaqueJob) : MonitorM PUnit 
goal: Lake.MonitorM PUnit

full_name: Lake.monitorJobs
code: /-- The job monitor function. An auxiliary definition for `runFetchM`. -/
def monitorJobs
  (jobs : Array OpaqueJob)
  (out : IO.FS.Stream)
  (failLv outLv : LogLevel)
  (minAction : JobAction)
  (useAnsi showProgress : Bool)
  (resetCtrl : String := "")
  (initFailures : Array String := #[])
  (totalJobs := jobs.size)
  (updateFrequency := 100)
: BaseIO (Array String) 
goal: BaseIO (Array String)

full_name: Lake.Workspace.runFetchM
code: /--
Run a build function in the Workspace's context using the provided configuration.
Reports incremental build progress and build logs. In quiet mode, only reports
failing build jobs (e.g., when using `-q` or non-verbose `--no-build`).
-/
def Workspace.runFetchM
  (ws : Workspace) (build : FetchM α) (cfg : BuildConfig := {})
: IO α 
goal: IO α

full_name: Lake.Workspace.runBuild
code: /-- Run a build function in the Workspace's context and await the result. -/
@[inline] def Workspace.runBuild
  (ws : Workspace) (build : FetchM (BuildJob α)) (cfg : BuildConfig := {})
: IO α 
goal: IO α

full_name: Lake.runBuild
code: /-- Produce a build job in the Lake monad's workspace and await the result. -/
@[inline] def runBuild
  (build : FetchM (BuildJob α)) (cfg : BuildConfig := {})
: LakeT IO α 
goal: Lake.LakeT IO α