File: .lake/packages/lean4/src/lean/Lean/Elab/InfoTree/Main.lean

full_name: Lean.Elab.CommandContextInfo.saveNoFileMap
code: def saveNoFileMap : m CommandContextInfo 
goal: m Lean.Elab.CommandContextInfo

full_name: Lean.Elab.CommandContextInfo.save
code: def save [MonadFileMap m] : m CommandContextInfo 
goal: m Lean.Elab.CommandContextInfo

full_name: Lean.Elab.PartialContextInfo.mergeIntoOuter?
code: /--
Merges the `inner` partial context into the `outer` context s.t. fields of the `inner` context
overwrite fields of the `outer` context. Panics if the invariant described in the documentation
for `PartialContextInfo` is violated.

When traversing an `InfoTree`, this function should be used to combine the context of outer
nodes with the partial context of their subtrees. This ensures that the traversal has the context
from the inner node to the root node of the `InfoTree` available, with partial contexts of
inner nodes taking priority over contexts of outer nodes.
-/
def PartialContextInfo.mergeIntoOuter?
    : (inner : PartialContextInfo) → (outer? : Option ContextInfo) → Option ContextInfo
  
goal: Option Lean.Elab.ContextInfo

full_name: Lean.Elab.CompletionInfo.stx
code: def CompletionInfo.stx : CompletionInfo → Syntax
  
goal: Lean.Elab.CompletionInfo → Lean.Syntax

full_name: Lean.Elab.CompletionInfo.lctx
code: /--
Obtains the `LocalContext` from this `CompletionInfo` if available and yields an empty context
otherwise.
-/
def CompletionInfo.lctx : CompletionInfo → LocalContext
  
goal: Lean.Elab.CompletionInfo → Lean.LocalContext

full_name: Lean.Elab.CustomInfo.format
code: def CustomInfo.format : CustomInfo → Format
  
goal: Lean.Elab.CustomInfo → Lean.Format

full_name: Lean.Elab.«instToFormatCustomInfo_.lake»
code: instance : ToFormat CustomInfo 
goal: Lean.ToFormat Lean.Elab.CustomInfo

full_name: Lean.Elab.InfoTree.findInfo?
code: partial def InfoTree.findInfo? (p : Info → Bool) (t : InfoTree) : Option Info 
goal: Option Lean.Elab.Info

full_name: Lean.Elab.InfoTree.substitute
code: /-- Instantiate the holes on the given `tree` with the assignment table.
(analogous to instantiating the metavariables in an expression) -/
partial def InfoTree.substitute (tree : InfoTree) (assignment : PersistentHashMap MVarId InfoTree) : InfoTree 
goal: Lean.Elab.InfoTree

full_name: Lean.Elab.ContextInfo.runCoreM
code: /-- Embeds a `CoreM` action in `IO` by supplying the information stored in `info`. -/
def ContextInfo.runCoreM (info : ContextInfo) (x : CoreM α) : IO α 
goal: IO α

full_name: Lean.Elab.ContextInfo.runMetaM
code: def ContextInfo.runMetaM (info : ContextInfo) (lctx : LocalContext) (x : MetaM α) : IO α 
goal: IO α

full_name: Lean.Elab.ContextInfo.toPPContext
code: def ContextInfo.toPPContext (info : ContextInfo) (lctx : LocalContext) : PPContext 
goal: Lean.PPContext

full_name: Lean.Elab.ContextInfo.ppSyntax
code: def ContextInfo.ppSyntax (info : ContextInfo) (lctx : LocalContext) (stx : Syntax) : IO Format 
goal: IO Lean.Format

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.InfoTree.Main.0.Lean.Elab.formatStxRange.fmtPos
code: private def formatStxRange (ctx : ContextInfo) (stx : Syntax) : Format 
goal: Lean.Format

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.InfoTree.Main.0.Lean.Elab.formatStxRange
code: private def formatStxRange (ctx : ContextInfo) (stx : Syntax) : Format 
goal: Lean.Format

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.InfoTree.Main.0.Lean.Elab.formatElabInfo
code: private def formatElabInfo (ctx : ContextInfo) (info : ElabInfo) : Format 
goal: Lean.Format

full_name: Lean.Elab.TermInfo.runMetaM
code: def TermInfo.runMetaM (info : TermInfo) (ctx : ContextInfo) (x : MetaM α) : IO α 
goal: IO α

full_name: Lean.Elab.TermInfo.format
code: def TermInfo.format (ctx : ContextInfo) (info : TermInfo) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.CompletionInfo.format
code: def CompletionInfo.format (ctx : ContextInfo) (info : CompletionInfo) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.CommandInfo.format
code: def CommandInfo.format (ctx : ContextInfo) (info : CommandInfo) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.OptionInfo.format
code: def OptionInfo.format (ctx : ContextInfo) (info : OptionInfo) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.FieldInfo.format
code: def FieldInfo.format (ctx : ContextInfo) (info : FieldInfo) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.ContextInfo.ppGoals
code: def ContextInfo.ppGoals (ctx : ContextInfo) (goals : List MVarId) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.TacticInfo.format
code: def TacticInfo.format (ctx : ContextInfo) (info : TacticInfo) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.MacroExpansionInfo.format
code: def MacroExpansionInfo.format (ctx : ContextInfo) (info : MacroExpansionInfo) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.UserWidgetInfo.format
code: def UserWidgetInfo.format (info : UserWidgetInfo) : Format 
goal: Lean.Format

full_name: Lean.Elab.FVarAliasInfo.format
code: def FVarAliasInfo.format (info : FVarAliasInfo) : Format 
goal: Lean.Format

full_name: Lean.Elab.FieldRedeclInfo.format
code: def FieldRedeclInfo.format (ctx : ContextInfo) (info : FieldRedeclInfo) : Format 
goal: Lean.Format

full_name: Lean.Elab.OmissionInfo.format
code: def OmissionInfo.format (ctx : ContextInfo) (info : OmissionInfo) : IO Format 
goal: IO Lean.Format

full_name: Lean.Elab.Info.format
code: def Info.format (ctx : ContextInfo) : Info → IO Format
  
goal: Lean.Elab.Info → IO Lean.Format

full_name: Lean.Elab.Info.toElabInfo?
code: def Info.toElabInfo? : Info → Option ElabInfo
  
goal: Lean.Elab.Info → Option Lean.Elab.ElabInfo

full_name: Lean.Elab.Info.updateContext?
code: /--
  Helper function for propagating the tactic metavariable context to its children nodes.
  We need this function because we preserve `TacticInfo` nodes during backtracking *and* their
  children. Moreover, we backtrack the metavariable context to undo metavariable assignments.
  `TacticInfo` nodes save the metavariable context before/after the tactic application, and
  can be pretty printed without any extra information. This is not the case for `TermInfo` nodes.
  Without this function, the formatting method would often fail when processing `TermInfo` nodes
  that are children of `TacticInfo` nodes that have been preserved during backtracking.
  Saving the metavariable context at `TermInfo` nodes is also not a good option because
  at `TermInfo` creation time, the metavariable context often miss information, e.g.,
  a TC problem has not been resolved, a postponed subterm has not been elaborated, etc.

  See `Term.SavedState.restore`.
-/
def Info.updateContext? : Option ContextInfo → Info → Option ContextInfo
  
goal: Option Lean.Elab.ContextInfo → Lean.Elab.Info → Option Lean.Elab.ContextInfo

full_name: Lean.Elab.InfoTree.format
code: partial def InfoTree.format (tree : InfoTree) (ctx? : Option ContextInfo := none) : IO Format 
goal: IO Lean.Format

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.InfoTree.Main.0.Lean.Elab.modifyInfoTrees
code: @[inline] private def modifyInfoTrees (f : PersistentArray InfoTree → PersistentArray InfoTree) : m Unit 
goal: m Unit

full_name: Lean.Elab.getResetInfoTrees
code: /-- Returns the current array of InfoTrees and resets it to an empty array. -/
def getResetInfoTrees : m (PersistentArray InfoTree) 
goal: m (Lean.PersistentArray Lean.Elab.InfoTree)

full_name: Lean.Elab.pushInfoTree
code: def pushInfoTree (t : InfoTree) : m Unit 
goal: m Unit

full_name: Lean.Elab.pushInfoLeaf
code: def pushInfoLeaf (t : Info) : m Unit 
goal: m Unit

full_name: Lean.Elab.addCompletionInfo
code: def addCompletionInfo (info : CompletionInfo) : m Unit 
goal: m Unit

full_name: Lean.Elab.addConstInfo
code: def addConstInfo [MonadEnv m] [MonadError m]
    (stx : Syntax) (n : Name) (expectedType? : Option Expr := none) : m Unit 
goal: m Unit

full_name: Lean.Elab.realizeGlobalConstNoOverloadWithInfo
code: /-- This does the same job as `realizeGlobalConstNoOverload`; resolving an identifier
syntax to a unique fully resolved name or throwing if there are ambiguities.
But also adds this resolved name to the infotree. This means that when you hover
over a name in the sourcefile you will see the fully resolved name in the hover info.-/
def realizeGlobalConstNoOverloadWithInfo (id : Syntax) (expectedType? : Option Expr := none) : CoreM Name 
goal: Lean.CoreM Lean.Name

full_name: Lean.Elab.realizeGlobalConstWithInfos
code: /-- Similar to `realizeGlobalConstNoOverloadWithInfo`, except if there are multiple name resolutions then it returns them as a list. -/
def realizeGlobalConstWithInfos (id : Syntax) (expectedType? : Option Expr := none) : CoreM (List Name) 
goal: Lean.CoreM (List Lean.Name)

full_name: Lean.Elab.realizeGlobalNameWithInfos
code: /-- Similar to `realizeGlobalName`, but it also adds the resolved name to the info tree. -/
def realizeGlobalNameWithInfos (ref : Syntax) (id : Name) : CoreM (List (Name × List String)) 
goal: Lean.CoreM (List (Lean.Name × List String))

full_name: Lean.Elab.withInfoContext'
code: /-- Use this to descend a node on the infotree that is being built.

It saves the current list of trees `t₀` and resets it and then runs `x >>= mkInfo`, producing either an `i : Info` or a hole id.
Running `x >>= mkInfo` will modify the trees state and produce a new list of trees `t₁`.
In the `i : Info` case, `t₁` become the children of a node `node i t₁` that is appended to `t₀`.
 -/
def withInfoContext' [MonadFinally m] (x : m α) (mkInfo : α → m (Sum Info MVarId)) : m α 
goal: m α

full_name: Lean.Elab.withInfoTreeContext
code: /-- Saves the current list of trees `t₀`, runs `x` to produce a new tree list `t₁` and
runs `mkInfoTree t₁` to get `n : InfoTree` and then restores the trees to be `t₀ ++ [n]`.-/
def withInfoTreeContext [MonadFinally m] (x : m α) (mkInfoTree : PersistentArray InfoTree → m InfoTree) : m α 
goal: m α

full_name: Lean.Elab.withInfoContext
code: /-- Run `x` as a new child infotree node with header given by `mkInfo`. -/
@[inline] def withInfoContext [MonadFinally m] (x : m α) (mkInfo : m Info) : m α 
goal: m α

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.InfoTree.Main.0.Lean.Elab.withSavedPartialInfoContext
code: private def withSavedPartialInfoContext [MonadFinally m]
    (x : m α)
    (ctx? : m (Option PartialContextInfo))
    : m α 
goal: m α

full_name: Lean.Elab.withSaveInfoContext
code: /--
Resets the trees state `t₀`, runs `x` to produce a new trees state `t₁` and sets the state to be
`t₀ ++ (InfoTree.context (PartialContextInfo.commandCtx Γ) <$> t₁)` where `Γ` is the context derived
from the monad state.
-/
def withSaveInfoContext
    [MonadNameGenerator m]
    [MonadFinally m]
    [MonadEnv m]
    [MonadOptions m]
    [MonadMCtx m]
    [MonadResolveName m]
    [MonadFileMap m]
    (x : m α)
    : m α 
goal: m α

full_name: Lean.Elab.withSaveParentDeclInfoContext
code: /--
Resets the trees state `t₀`, runs `x` to produce a new trees state `t₁` and sets the state to be
`t₀ ++ (InfoTree.context (PartialContextInfo.parentDeclCtx Γ) <$> t₁)` where `Γ` is the parent decl
name provided by `MonadParentDecl m`.
-/
def withSaveParentDeclInfoContext [MonadFinally m] [MonadParentDecl m] (x : m α) : m α 
goal: m α

full_name: Lean.Elab.getInfoHoleIdAssignment?
code: def getInfoHoleIdAssignment? (mvarId : MVarId) : m (Option InfoTree) 
goal: m (Option Lean.Elab.InfoTree)

full_name: Lean.Elab.assignInfoHoleId
code: def assignInfoHoleId (mvarId : MVarId) (infoTree : InfoTree) : m Unit 
goal: m Unit

full_name: Lean.Elab.withMacroExpansionInfo
code: def withMacroExpansionInfo [MonadFinally m] [Monad m] [MonadInfoTree m] [MonadLCtx m] (stx output : Syntax) (x : m α) : m α 
goal: m α

full_name: Lean.Elab.withInfoHole
code: @[inline] def withInfoHole [MonadFinally m] [Monad m] [MonadInfoTree m] (mvarId : MVarId) (x : m α) : m α 
goal: m α

full_name: Lean.Elab.enableInfoTree
code: def enableInfoTree [MonadInfoTree m] (flag := true) : m Unit 
goal: m Unit

full_name: Lean.Elab.withEnableInfoTree
code: def withEnableInfoTree [Monad m] [MonadInfoTree m] [MonadFinally m] (flag : Bool) (x : m α) : m α 
goal: m α

full_name: Lean.Elab.getInfoTrees
code: def getInfoTrees [MonadInfoTree m] [Monad m] : m (PersistentArray InfoTree) 
goal: m (Lean.PersistentArray Lean.Elab.InfoTree)