File: .lake/packages/lean4/src/lean/Lean/Elab/Command.lean

full_name: Lean.Elab.Command.Scope.opts
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: Lean.Options

full_name: Lean.Elab.Command.Scope.varUIds
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: Array Lean.Name

full_name: Lean.Elab.Command.Scope.levelNames
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: List Lean.Name

full_name: Lean.Elab.Command.Scope
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: Type

full_name: Lean.Elab.Command.Scope.openDecls
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: List Lean.OpenDecl

full_name: Lean.Elab.Command.Scope.currNamespace
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: Lean.Name

full_name: Lean.Elab.Command.Scope.header
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: String

full_name: Lean.Elab.Command.Scope.isNoncomputable
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: Bool

full_name: Lean.Elab.Command.Scope.varDecls
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: Array (Lean.TSyntax `Lean.Parser.Term.bracketedBinder)

full_name: Lean.Elab.Command.instInhabitedScope
code: structure Scope where
  header        : String
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
  levelNames    : List Name := []
  /-- section variables -/
  varDecls      : Array (TSyntax ``Parser.Term.bracketedBinder) := #[]
  /-- Globally unique internal identifiers for the `varDecls` -/
  varUIds       : Array Name := #[]
  /-- noncomputable sections automatically add the `noncomputable` modifier to any declaration we cannot generate code for. -/
  isNoncomputable : Bool := false
  deriving Inhabited
goal: Inhabited Lean.Elab.Command.Scope

full_name: Lean.Elab.Command.State.infoState
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Lean.Elab.InfoState

full_name: Lean.Elab.Command.State.ngen
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Lean.NameGenerator

full_name: Lean.Elab.Command.State.messages
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Lean.MessageLog

full_name: Lean.Elab.Command.State.scopes
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: List Lean.Elab.Command.Scope

full_name: Lean.Elab.Command.State
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Type

full_name: Lean.Elab.Command.State.nextMacroScope
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Nat

full_name: Lean.Elab.Command.instNonemptyState
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Nonempty Lean.Elab.Command.State

full_name: Lean.Elab.Command.State.traceState
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Lean.TraceState

full_name: Lean.Elab.Command.State.env
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Lean.Environment

full_name: Lean.Elab.Command.State.maxRecDepth
code: structure State where
  env            : Environment
  messages       : MessageLog := {}
  scopes         : List Scope := [{ header := "" }]
  nextMacroScope : Nat := firstFrontendMacroScope + 1
  maxRecDepth    : Nat
  ngen           : NameGenerator := {}
  infoState      : InfoState := {}
  traceState     : TraceState := {}
  deriving Nonempty
goal: Nat

full_name: Lean.Elab.Command.Context.fileName
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: String

full_name: Lean.Elab.Command.Context.cmdPos
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: String.Pos

full_name: Lean.Elab.Command.Context.ref
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Lean.Syntax

full_name: Lean.Elab.Command.Context.currRecDepth
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Nat

full_name: Lean.Elab.Command.Context.suppressElabErrors
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Bool

full_name: Lean.Elab.Command.Context
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Type

full_name: Lean.Elab.Command.Context.tacticCache?
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Option (IO.Ref Lean.Elab.Tactic.Cache)

full_name: Lean.Elab.Command.Context.fileMap
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Lean.FileMap

full_name: Lean.Elab.Command.Context.cancelTk?
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Option IO.CancelToken

full_name: Lean.Elab.Command.Context.snap?
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Option (Lean.Language.SnapshotBundle Lean.Language.DynamicSnapshot)

full_name: Lean.Elab.Command.Context.currMacroScope
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Lean.MacroScope

full_name: Lean.Elab.Command.Context.macroStack
code: structure Context where
  fileName       : String
  fileMap        : FileMap
  currRecDepth   : Nat := 0
  cmdPos         : String.Pos := 0
  macroStack     : MacroStack := []
  currMacroScope : MacroScope := firstFrontendMacroScope
  ref            : Syntax := Syntax.missing
  tacticCache?   : Option (IO.Ref Tactic.Cache)
  /--
  Snapshot for incremental reuse and reporting of command elaboration. Currently only used for
  (mutual) defs and contained tactics, in which case the `DynamicSnapshot` is a
  `HeadersParsedSnapshot`.

  Definitely resolved in `Language.Lean.process.doElab`.

  Invariant: if the bundle's `old?` is set, the context and state at the beginning of current and
  old elaboration are identical.
  -/
  snap?          : Option (Language.SnapshotBundle Language.DynamicSnapshot)
  /-- Cancellation token forwarded to `Core.cancelTk?`. -/
  cancelTk?      : Option IO.CancelToken
  /--
  If set (when `showPartialSyntaxErrors` is not set and parsing failed), suppresses most elaboration
  errors; see also `logMessage` below.
  -/
  suppressElabErrors : Bool := false
goal: Lean.Elab.MacroStack

full_name: Lean.Elab.Command.CommandElabCoreM
code: abbrev CommandElabCoreM (ε) 
goal: Type

full_name: Lean.Elab.Command.CommandElabM
code: abbrev CommandElabM 
goal: Type

full_name: Lean.Elab.Command.CommandElab
code: abbrev CommandElab  
goal: Type

full_name: Lean.Elab.Command.Linter.run
code: structure Linter where
  run : Syntax → CommandElabM Unit
  name : Name := by exact decl_name%
goal: Lean.Syntax → Lean.Elab.Command.CommandElabM Unit

full_name: Lean.Elab.Command.Linter
code: structure Linter where
  run : Syntax → CommandElabM Unit
  name : Name := by exact decl_name%
goal: Type

full_name: Lean.Elab.Command.Linter.name
code: structure Linter where
  run : Syntax → CommandElabM Unit
  name : Name := by exact decl_name%
goal: Lean.Name

full_name: Lean.Elab.Command.instMonadCommandElabM
code: @[always_inline]
instance : Monad CommandElabM 
goal: Monad Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.tryCatch
code: /--
Like `Core.tryCatchRuntimeEx`; runtime errors are generally used to abort term elaboration, so we do
want to catch and process them at the command level.
-/
@[inline] protected def tryCatch (x : CommandElabM α) (h : Exception → CommandElabM α) :
    CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.instMonadExceptOfExceptionCommandElabM
code: instance : MonadExceptOf Exception CommandElabM 
goal: MonadExceptOf Lean.Exception Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.mkState
code: def mkState (env : Environment) (messages : MessageLog := {}) (opts : Options := {}) : State 
goal: Lean.Elab.Command.State

full_name: Lean.Elab.Command.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.573
code: builtin_initialize lintersRef : IO.Ref (Array Linter) ← IO.mkRef #[]
goal: IO (IO.Ref (Array Lean.Linter))

full_name: Lean.Elab.Command.lintersRef
code: builtin_initialize lintersRef : IO.Ref (Array Linter) ← IO.mkRef #[]
goal: IO.Ref (Array Lean.Linter)

full_name: Lean.Elab.Command.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.607
code: builtin_initialize registerTraceClass `Elab.lint
goal: IO Unit

full_name: Lean.Elab.Command.addLinter
code: def addLinter (l : Linter) : IO Unit 
goal: IO Unit

full_name: Lean.Elab.Command.instMonadInfoTreeCommandElabM
code: instance : MonadInfoTree CommandElabM 
goal: Lean.Elab.MonadInfoTree Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.instMonadEnvCommandElabM
code: instance : MonadEnv CommandElabM 
goal: Lean.MonadEnv Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.instMonadOptionsCommandElabM
code: @[always_inline]
instance : MonadOptions CommandElabM 
goal: Lean.MonadOptions Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.getRef
code: protected def getRef : CommandElabM Syntax 
goal: Lean.Elab.Command.CommandElabM Lean.Syntax

full_name: Lean.Elab.Command.instAddMessageContextCommandElabM
code: instance : AddMessageContext CommandElabM 
goal: Lean.AddMessageContext Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.instMonadRefCommandElabM
code: instance : MonadRef CommandElabM 
goal: Lean.MonadRef Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.instMonadTraceCommandElabM
code: instance : MonadTrace CommandElabM 
goal: Lean.MonadTrace Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.instAddErrorMessageContextCommandElabM
code: instance : AddErrorMessageContext CommandElabM 
goal: Lean.AddErrorMessageContext Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.mkMessageAux
code: def mkMessageAux (ctx : Context) (ref : Syntax) (msgData : MessageData) (severity : MessageSeverity) : Message 
goal: Lean.Message

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.addTraceAsMessagesCore
code: private def addTraceAsMessagesCore (ctx : Context) (log : MessageLog) (traceState : TraceState) : MessageLog 
goal: Lean.MessageLog

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.addTraceAsMessages
code: private def addTraceAsMessages : CommandElabM Unit 
goal: Lean.Elab.Command.CommandElabM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.runCore
code: private def runCore (x : CoreM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.liftCoreM
code: def liftCoreM (x : CoreM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.ioErrorToMessage
code: private def ioErrorToMessage (ctx : Context) (ref : Syntax) (err : IO.Error) : Message 
goal: Lean.Message

full_name: Lean.Elab.Command.liftIO
code: @[inline] def liftIO {α} (x : IO α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.instMonadLiftTIOCommandElabM
code: instance : MonadLiftT IO CommandElabM 
goal: MonadLiftT IO Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.getScope
code: def getScope : CommandElabM Scope 
goal: Lean.Elab.Command.CommandElabM Lean.Elab.Command.Scope

full_name: Lean.Elab.Command.instMonadResolveNameCommandElabM
code: instance : MonadResolveName CommandElabM 
goal: Lean.MonadResolveName Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.instMonadLogCommandElabM
code: instance : MonadLog CommandElabM 
goal: Lean.MonadLog Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.runLinters
code: def runLinters (stx : Syntax) : CommandElabM Unit 
goal: Lean.Elab.Command.CommandElabM Unit

full_name: Lean.Elab.Command.getCurrMacroScope
code: protected def getCurrMacroScope : CommandElabM Nat  
goal: Lean.Elab.Command.CommandElabM Nat

full_name: Lean.Elab.Command.getMainModule
code: protected def getMainModule     : CommandElabM Name 
goal: Lean.Elab.Command.CommandElabM Lean.Name

full_name: Lean.Elab.Command.withFreshMacroScope
code: protected def withFreshMacroScope {α} (x : CommandElabM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.instMonadQuotationCommandElabM
code: instance : MonadQuotation CommandElabM 
goal: Lean.MonadQuotation Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.mkCommandElabAttributeUnsafe
code: unsafe def mkCommandElabAttributeUnsafe (ref : Name) : IO (KeyedDeclsAttribute CommandElab) 
goal: IO (Lean.KeyedDeclsAttribute Lean.Elab.Command.CommandElab)

full_name: Lean.Elab.Command.mkCommandElabAttribute
code: @[implemented_by mkCommandElabAttributeUnsafe]
opaque mkCommandElabAttribute (ref : Name) : IO (KeyedDeclsAttribute CommandElab)
goal: IO (Lean.KeyedDeclsAttribute Lean.Elab.Command.CommandElab)

full_name: Lean.Elab.Command.commandElabAttribute
code: builtin_initialize commandElabAttribute : KeyedDeclsAttribute CommandElab ← mkCommandElabAttribute decl_name%
goal: Lean.KeyedDeclsAttribute Lean.Elab.Command.CommandElab

full_name: Lean.Elab.Command.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.2634
code: builtin_initialize commandElabAttribute : KeyedDeclsAttribute CommandElab ← mkCommandElabAttribute decl_name%
goal: IO (Lean.KeyedDeclsAttribute Lean.Elab.Command.CommandElab)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.mkInfoTree
code: private def mkInfoTree (elaborator : Name) (stx : Syntax) (trees : PersistentArray InfoTree) : CommandElabM InfoTree 
goal: Lean.Elab.Command.CommandElabM Lean.Elab.InfoTree

full_name: Lean.Elab.Command.withoutCommandIncrementality
code: /--
Disables incremental command reuse *and* reporting for `act` if `cond` is true by setting
`Context.snap?` to `none`.
-/
def withoutCommandIncrementality (cond : Bool) (act : CommandElabM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.elabCommandUsing
code: private def elabCommandUsing (s : State) (stx : Syntax) : List (KeyedDeclsAttribute.AttributeEntry CommandElab) → CommandElabM Unit
  
goal: List (Lean.KeyedDeclsAttribute.AttributeEntry Lean.Elab.Command.CommandElab) → Lean.Elab.Command.CommandElabM Unit

full_name: Lean.Elab.Command.withMacroExpansion
code: /-- Elaborate `x` with `stx` on the macro stack -/
def withMacroExpansion (beforeStx afterStx : Syntax) (x : CommandElabM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.instMonadMacroAdapterCommandElabM
code: instance : MonadMacroAdapter CommandElabM 
goal: Lean.Elab.MonadMacroAdapter Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.instMonadRecDepthCommandElabM
code: instance : MonadRecDepth CommandElabM 
goal: Lean.MonadRecDepth Lean.Elab.Command.CommandElabM

full_name: Lean.Elab.Command.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.3323
code: builtin_initialize registerTraceClass `Elab.command
goal: IO Unit

full_name: Lean.Elab.Command.MacroExpandedSnapshot.macroDecl
code: /-- Snapshot after macro expansion of a command. -/
structure MacroExpandedSnapshot extends Snapshot where
  /-- The declaration name of the macro. -/
  macroDecl : Name
  /-- The expanded syntax tree. -/
  newStx    : Syntax
  /-- `State.nextMacroScope` after expansion. -/
  newNextMacroScope : Nat
  /-- Whether any traces were present after expansion. -/
  hasTraces : Bool
  /--
  Follow-up elaboration snapshots, one per command if `newStx` is a sequence of commands.
  -/
  next : Array (SnapshotTask DynamicSnapshot)
deriving TypeName
goal: Lean.Name

full_name: Lean.Elab.Command.MacroExpandedSnapshot.next
code: /-- Snapshot after macro expansion of a command. -/
structure MacroExpandedSnapshot extends Snapshot where
  /-- The declaration name of the macro. -/
  macroDecl : Name
  /-- The expanded syntax tree. -/
  newStx    : Syntax
  /-- `State.nextMacroScope` after expansion. -/
  newNextMacroScope : Nat
  /-- Whether any traces were present after expansion. -/
  hasTraces : Bool
  /--
  Follow-up elaboration snapshots, one per command if `newStx` is a sequence of commands.
  -/
  next : Array (SnapshotTask DynamicSnapshot)
deriving TypeName
goal: Array (Lean.Language.SnapshotTask Lean.Language.DynamicSnapshot)

full_name: Lean.Elab.Command.MacroExpandedSnapshot.newStx
code: /-- Snapshot after macro expansion of a command. -/
structure MacroExpandedSnapshot extends Snapshot where
  /-- The declaration name of the macro. -/
  macroDecl : Name
  /-- The expanded syntax tree. -/
  newStx    : Syntax
  /-- `State.nextMacroScope` after expansion. -/
  newNextMacroScope : Nat
  /-- Whether any traces were present after expansion. -/
  hasTraces : Bool
  /--
  Follow-up elaboration snapshots, one per command if `newStx` is a sequence of commands.
  -/
  next : Array (SnapshotTask DynamicSnapshot)
deriving TypeName
goal: Lean.Syntax

full_name: Lean.Elab.Command.MacroExpandedSnapshot.newNextMacroScope
code: /-- Snapshot after macro expansion of a command. -/
structure MacroExpandedSnapshot extends Snapshot where
  /-- The declaration name of the macro. -/
  macroDecl : Name
  /-- The expanded syntax tree. -/
  newStx    : Syntax
  /-- `State.nextMacroScope` after expansion. -/
  newNextMacroScope : Nat
  /-- Whether any traces were present after expansion. -/
  hasTraces : Bool
  /--
  Follow-up elaboration snapshots, one per command if `newStx` is a sequence of commands.
  -/
  next : Array (SnapshotTask DynamicSnapshot)
deriving TypeName
goal: Nat

full_name: Lean.Elab.Command.MacroExpandedSnapshot
code: /-- Snapshot after macro expansion of a command. -/
structure MacroExpandedSnapshot extends Snapshot where
  /-- The declaration name of the macro. -/
  macroDecl : Name
  /-- The expanded syntax tree. -/
  newStx    : Syntax
  /-- `State.nextMacroScope` after expansion. -/
  newNextMacroScope : Nat
  /-- Whether any traces were present after expansion. -/
  hasTraces : Bool
  /--
  Follow-up elaboration snapshots, one per command if `newStx` is a sequence of commands.
  -/
  next : Array (SnapshotTask DynamicSnapshot)
deriving TypeName
goal: Type

full_name: Lean.Elab.Command.MacroExpandedSnapshot.hasTraces
code: /-- Snapshot after macro expansion of a command. -/
structure MacroExpandedSnapshot extends Snapshot where
  /-- The declaration name of the macro. -/
  macroDecl : Name
  /-- The expanded syntax tree. -/
  newStx    : Syntax
  /-- `State.nextMacroScope` after expansion. -/
  newNextMacroScope : Nat
  /-- Whether any traces were present after expansion. -/
  hasTraces : Bool
  /--
  Follow-up elaboration snapshots, one per command if `newStx` is a sequence of commands.
  -/
  next : Array (SnapshotTask DynamicSnapshot)
deriving TypeName
goal: Bool

full_name: Lean.Elab.Command.inst._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.3434
code: TypeName
goal: TypeName Lean.Elab.Command.MacroExpandedSnapshot

full_name: Lean.Elab.Command.instImpl._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.3434
code: TypeName
goal: TypeName Lean.Elab.Command.MacroExpandedSnapshot

full_name: Lean.Elab.Command.instTypeNameMacroExpandedSnapshot
code: TypeName
goal: TypeName Lean.Elab.Command.MacroExpandedSnapshot

full_name: Lean.Elab.Command.instToSnapshotTreeMacroExpandedSnapshot
code: instance : ToSnapshotTree MacroExpandedSnapshot 
goal: Lean.Language.ToSnapshotTree Lean.Elab.Command.MacroExpandedSnapshot

full_name: Lean.Elab.Command.elabCommand
code: partial def elabCommand (stx : Syntax) : CommandElabM Unit 
goal: Lean.Elab.Command.CommandElabM Unit

full_name: Lean.Elab.Command.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.4589
code: builtin_initialize registerTraceClass `Elab.input
goal: IO Unit

full_name: Lean.Elab.Command.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.4642
code: /-- Option for showing elaboration errors from partial syntax errors. -/
register_builtin_option showPartialSyntaxErrors : Bool := {
  defValue := false
  descr    := "show elaboration errors from partial syntax trees (i.e. after parser recovery)"
}
goal: IO (Lean.Option Bool)

full_name: Lean.Elab.Command.showPartialSyntaxErrors
code: /-- Option for showing elaboration errors from partial syntax errors. -/
register_builtin_option showPartialSyntaxErrors : Bool := {
  defValue := false
  descr    := "show elaboration errors from partial syntax trees (i.e. after parser recovery)"
}
goal: Lean.Option Bool

full_name: Lean.Elab.Command.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Command._hyg.4676
code: builtin_initialize
  registerTraceClass `Elab.info
  registerTraceClass `Elab.snapshotTree
goal: IO Unit

full_name: Lean.Elab.Command.elabCommandTopLevel
code: /--
`elabCommand` wrapper that should be used for the initial invocation, not for recursive calls after
macro expansion etc.
-/
def elabCommandTopLevel (stx : Syntax) : CommandElabM Unit 
goal: Lean.Elab.Command.CommandElabM Unit

full_name: Lean.Elab.Command.adaptExpander
code: /-- Adapt a syntax transformation to a regular, command-producing elaborator. -/
def adaptExpander (exp : Syntax → CommandElabM Syntax) : CommandElab 
goal: Lean.Elab.Command.CommandElab

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.getVarDecls
code: private def getVarDecls (s : State) : Array Syntax 
goal: Array Lean.Syntax

full_name: Lean.Elab.Command.instInhabitedCommandElabM
code: instance {α} : Inhabited (CommandElabM α) 
goal: Inhabited (Lean.Elab.Command.CommandElabM α)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.mkMetaContext
code: private def mkMetaContext : Meta.Context 
goal: Lean.Meta.Context

full_name: Lean.Elab.Command.getBracketedBinderIds
code: /-- Return identifier names in the given bracketed binder. -/
def getBracketedBinderIds : Syntax → Array Name
  
goal: Lean.Syntax → Array Lean.Name

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.mkTermContext
code: private def mkTermContext (ctx : Context) (s : State) : Term.Context 
goal: Lean.Elab.Term.Context

full_name: Lean.Elab.Command.liftTermElabM
code: /--
Lift the `TermElabM` monadic action `x` into a `CommandElabM` monadic action.

Note that `x` is executed with an empty message log. Thus, `x` cannot modify/view messages produced by
previous commands.

If you need to access the free variables corresponding to the ones declared using the `variable` command,
consider using `runTermElabM`.

Recall that `TermElabM` actions can automatically lift `MetaM` and `CoreM` actions.
Example:
```
import Lean

open Lean Elab Command Meta

def printExpr (e : Expr) : MetaM Unit := do
  IO.println s!"{← ppExpr e} : {← ppExpr (← inferType e)}"

#eval
  liftTermElabM do
    printExpr (mkConst ``Nat)
```
-/
def liftTermElabM (x : TermElabM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.runTermElabM
code: /--
Execute the monadic action `elabFn xs` as a `CommandElabM` monadic action, where `xs` are free variables
corresponding to all active scoped variables declared using the `variable` command.

This method is similar to `liftTermElabM`, but it elaborates all scoped variables declared using the `variable`
command.

Example:
```
import Lean

open Lean Elab Command Meta

variable {α : Type u} {f : α → α}
variable (n : Nat)

#eval
  runTermElabM fun xs => do
    for x in xs do
      IO.println s!"{← ppExpr x} : {← ppExpr (← inferType x)}"
```
-/
def runTermElabM (elabFn : Array Expr → TermElabM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.withLoggingExceptions
code: /--
Catches and logs exceptions occurring in `x`. Unlike `try catch` in `CommandElabM`, this function
catches interrupt exceptions as well and thus is intended for use at the top level of elaboration.
Interrupt and abort exceptions are caught but not logged.
-/
@[inline] def withLoggingExceptions (x : CommandElabM Unit) : CommandElabCoreM Empty Unit 
goal: Lean.Elab.Command.CommandElabCoreM Empty Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Command.0.Lean.Elab.Command.liftAttrM
code: private def liftAttrM {α} (x : AttrM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.getScopes
code: def getScopes : CommandElabM (List Scope) 
goal: Lean.Elab.Command.CommandElabM (List Lean.Elab.Command.Scope)

full_name: Lean.Elab.Command.modifyScope
code: def modifyScope (f : Scope → Scope) : CommandElabM Unit 
goal: Lean.Elab.Command.CommandElabM Unit

full_name: Lean.Elab.Command.withScope
code: def withScope (f : Scope → Scope) (x : CommandElabM α) : CommandElabM α 
goal: Lean.Elab.Command.CommandElabM α

full_name: Lean.Elab.Command.getLevelNames
code: def getLevelNames : CommandElabM (List Name) 
goal: Lean.Elab.Command.CommandElabM (List Lean.Name)

full_name: Lean.Elab.Command.addUnivLevel
code: def addUnivLevel (idStx : Syntax) : CommandElabM Unit 
goal: Lean.Elab.Command.CommandElabM Unit

full_name: Lean.Elab.Command.expandDeclId
code: def expandDeclId (declId : Syntax) (modifiers : Modifiers) : CommandElabM ExpandDeclIdResult 
goal: Lean.Elab.Command.CommandElabM Lean.Elab.ExpandDeclIdResult

full_name: Lean.liftCommandElabM
code: /--
Lifts an action in `CommandElabM` into `CoreM`, updating the traces and the environment.

Commands that modify the processing of subsequent commands,
such as `open` and `namespace` commands,
only have an effect for the remainder of the `CommandElabM` computation passed here,
and do not affect subsequent commands.
-/
def liftCommandElabM (cmd : CommandElabM α) : CoreM α 
goal: Lean.CoreM α

full_name: Lean.withSetOptionIn
code: /--
Given a command elaborator `cmd`, returns a new command elaborator that
first evaluates any local `set_option ... in ...` clauses and then invokes `cmd` on what remains.
-/
partial def withSetOptionIn (cmd : CommandElab) : CommandElab 
goal: Lean.Elab.Command.CommandElab