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

full_name: Lean.Syntax.prettyPrint
code: def Syntax.prettyPrint (stx : Syntax) : Format 
goal: Lean.Format

full_name: Lean.MacroScopesView.format
code: def MacroScopesView.format (view : MacroScopesView) (mainModule : Name) : Format 
goal: Lean.Format

full_name: Lean.MacroScopesView.equalScope
code: /--
Two names are from the same lexical scope if their scoping information modulo `MacroScopesView.name`
is equal.
-/
def MacroScopesView.equalScope (a b : MacroScopesView) : Bool 
goal: Bool

full_name: Lean.Elab.expandOptNamedPrio
code: def expandOptNamedPrio (stx : Syntax) : MacroM Nat 
goal: Lean.MacroM Nat

full_name: Lean.Elab.MacroStackElem.before
code: structure MacroStackElem where
  before : Syntax
  after : Syntax
goal: Lean.Syntax

full_name: Lean.Elab.MacroStackElem.after
code: structure MacroStackElem where
  before : Syntax
  after : Syntax
goal: Lean.Syntax

full_name: Lean.Elab.MacroStackElem
code: structure MacroStackElem where
  before : Syntax
  after : Syntax
goal: Type

full_name: Lean.Elab.MacroStack
code: abbrev MacroStack 
goal: Type

full_name: Lean.Elab.getBetterRef
code: /-- If `ref` does not have position information, then try to use macroStack -/
def getBetterRef (ref : Syntax) (macroStack : MacroStack) : Syntax 
goal: Lean.Syntax

full_name: Lean.Elab.pp.macroStack
code: register_builtin_option pp.macroStack : Bool := {
  defValue := false
  group    := "pp"
  descr    := "display macro expansion stack"
}
goal: Lean.Option Bool

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Util._hyg.351
code: register_builtin_option pp.macroStack : Bool := {
  defValue := false
  group    := "pp"
  descr    := "display macro expansion stack"
}
goal: IO (Lean.Option Bool)

full_name: Lean.Elab.addMacroStack
code: def addMacroStack {m} [Monad m] [MonadOptions m] (msgData : MessageData) (macroStack : MacroStack) : m MessageData 
goal: m Lean.MessageData

full_name: Lean.Elab.checkSyntaxNodeKind
code: def checkSyntaxNodeKind [Monad m] [MonadEnv m] [MonadError m] (k : Name) : m Name 
goal: m Lean.Name

full_name: Lean.Elab.checkSyntaxNodeKindAtNamespaces
code: def checkSyntaxNodeKindAtNamespaces [Monad m] [MonadEnv m] [MonadError m] (k : Name) : Name → m Name
  
goal: Lean.Name → m Lean.Name

full_name: Lean.Elab.checkSyntaxNodeKindAtCurrentNamespaces
code: def checkSyntaxNodeKindAtCurrentNamespaces (k : Name) : AttrM Name 
goal: Lean.AttrM Lean.Name

full_name: Lean.Elab.syntaxNodeKindOfAttrParam
code: def syntaxNodeKindOfAttrParam (defaultParserNamespace : Name) (stx : Syntax) : AttrM SyntaxNodeKind 
goal: Lean.AttrM Lean.SyntaxNodeKind

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Util.0.Lean.Elab.evalSyntaxConstantUnsafe
code: private unsafe def evalSyntaxConstantUnsafe (env : Environment) (opts : Options) (constName : Name) : ExceptT String Id Syntax 
goal: ExceptT String Id Lean.Syntax

full_name: Lean.Elab.evalSyntaxConstant
code: @[implemented_by evalSyntaxConstantUnsafe]
opaque evalSyntaxConstant (env : Environment) (opts : Options) (constName : Name) : ExceptT String Id Syntax 
goal: ExceptT String Id Lean.Syntax

full_name: Lean.Elab.mkElabAttribute
code: unsafe def mkElabAttribute (γ) (attrBuiltinName attrName : Name) (parserNamespace : Name) (typeName : Name) (kind : String)
    (attrDeclName : Name := by exact decl_name%) : IO (KeyedDeclsAttribute γ) 
goal: IO (Lean.KeyedDeclsAttribute γ)

full_name: Lean.Elab.mkMacroAttributeUnsafe
code: unsafe def mkMacroAttributeUnsafe (ref : Name) : IO (KeyedDeclsAttribute Macro) 
goal: IO (Lean.KeyedDeclsAttribute Lean.Macro)

full_name: Lean.Elab.mkMacroAttribute
code: @[implemented_by mkMacroAttributeUnsafe]
opaque mkMacroAttribute (ref : Name) : IO (KeyedDeclsAttribute Macro)
goal: IO (Lean.KeyedDeclsAttribute Lean.Macro)

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Util._hyg.1027
code: builtin_initialize macroAttribute : KeyedDeclsAttribute Macro ← mkMacroAttribute decl_name%
goal: IO (Lean.KeyedDeclsAttribute Lean.Macro)

full_name: Lean.Elab.macroAttribute
code: builtin_initialize macroAttribute : KeyedDeclsAttribute Macro ← mkMacroAttribute decl_name%
goal: Lean.KeyedDeclsAttribute Lean.Macro

full_name: Lean.Elab.expandMacroImpl?
code: /--
Try to expand macro at syntax tree root and return macro declaration name and new syntax if successful.
Return none if all macros threw `Macro.Exception.unsupportedSyntax`.
-/
def expandMacroImpl? (env : Environment) : Syntax → MacroM (Option (Name × Except Macro.Exception Syntax)) 
goal: Lean.Syntax → Lean.MacroM (Option (Lean.Name × Except Lean.Macro.Exception Lean.Syntax))

full_name: Lean.Elab.MonadMacroAdapter.setNextMacroScope
code: class MonadMacroAdapter (m : Type → Type) where
  getCurrMacroScope                  : m MacroScope
  getNextMacroScope                  : m MacroScope
  setNextMacroScope                  : MacroScope → m Unit
goal: Lean.MacroScope → m Unit

full_name: Lean.Elab.MonadMacroAdapter
code: class MonadMacroAdapter (m : Type → Type) where
  getCurrMacroScope                  : m MacroScope
  getNextMacroScope                  : m MacroScope
  setNextMacroScope                  : MacroScope → m Unit
goal: Type

full_name: Lean.Elab.MonadMacroAdapter.getNextMacroScope
code: class MonadMacroAdapter (m : Type → Type) where
  getCurrMacroScope                  : m MacroScope
  getNextMacroScope                  : m MacroScope
  setNextMacroScope                  : MacroScope → m Unit
goal: m Lean.MacroScope

full_name: Lean.Elab.MonadMacroAdapter.getCurrMacroScope
code: class MonadMacroAdapter (m : Type → Type) where
  getCurrMacroScope                  : m MacroScope
  getNextMacroScope                  : m MacroScope
  setNextMacroScope                  : MacroScope → m Unit
goal: m Lean.MacroScope

full_name: Lean.Elab.instMonadMacroAdapterOfMonadLift
code: @[always_inline]
instance (m n) [MonadLift m n] [MonadMacroAdapter m] : MonadMacroAdapter n 
goal: Lean.Elab.MonadMacroAdapter n

full_name: Lean.Elab.liftMacroM
code: def liftMacroM [Monad m] [MonadMacroAdapter m] [MonadEnv m] [MonadRecDepth m] [MonadError m] [MonadResolveName m] [MonadTrace m] [MonadOptions m] [AddMessageContext m] [MonadLiftT IO m] (x : MacroM α) : m α 
goal: m α

full_name: Lean.Elab.adaptMacro
code: @[inline] def adaptMacro {m : Type → Type} [Monad m] [MonadMacroAdapter m] [MonadEnv m] [MonadRecDepth m] [MonadError m]  [MonadResolveName m] [MonadTrace m] [MonadOptions m] [AddMessageContext m] [MonadLiftT IO m] (x : Macro) (stx : Syntax) : m Syntax 
goal: m Lean.Syntax

full_name: Lean.Elab.mkUnusedBaseName.loop
code: partial def mkUnusedBaseName (baseName : Name) : MacroM Name 
goal: Lean.MacroM Lean.Name

full_name: Lean.Elab.mkUnusedBaseName
code: partial def mkUnusedBaseName (baseName : Name) : MacroM Name 
goal: Lean.MacroM Lean.Name

full_name: Lean.Elab.logException
code: def logException [Monad m] [MonadLog m] [AddMessageContext m] [MonadOptions m] [MonadLiftT IO m] (ex : Exception) : m Unit 
goal: m Unit

full_name: Lean.Elab.withLogging
code: /--
If `x` throws an exception, catch it and turn it into a log message (using `logException`).
-/
def withLogging [Monad m] [MonadLog m] [MonadExcept Exception m] [AddMessageContext m] [MonadOptions m] [MonadLiftT IO m]
    (x : m Unit) : m Unit 
goal: m Unit

full_name: Lean.Elab.nestedExceptionToMessageData
code: def nestedExceptionToMessageData [Monad m] [MonadLog m] (ex : Exception) : m MessageData 
goal: m Lean.MessageData

full_name: Lean.Elab.throwErrorWithNestedErrors
code: def throwErrorWithNestedErrors [MonadError m] [Monad m] [MonadLog m] (msg : MessageData) (exs : Array Exception) : m α 
goal: m α

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Util._hyg.2546
code: builtin_initialize
  registerTraceClass `Elab
  registerTraceClass `Elab.step
  registerTraceClass `Elab.step.result (inherited := true)
goal: IO Unit