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

full_name: Lean.pp.raw
code: register_builtin_option pp.raw : Bool := {
  defValue := false
  group    := "pp"
  descr    := "(pretty printer) print raw expression/syntax tree"
}
goal: Lean.Option Bool

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Util.PPExt._hyg.6
code: register_builtin_option pp.raw : Bool := {
  defValue := false
  group    := "pp"
  descr    := "(pretty printer) print raw expression/syntax tree"
}
goal: IO (Lean.Option Bool)

full_name: Lean.pp.raw.showInfo
code: register_builtin_option pp.raw.showInfo : Bool := {
  defValue := false
  group    := "pp"
  descr    := "(pretty printer) print `SourceInfo` metadata with raw printer"
}
goal: Lean.Option Bool

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Util.PPExt._hyg.48
code: register_builtin_option pp.raw.showInfo : Bool := {
  defValue := false
  group    := "pp"
  descr    := "(pretty printer) print `SourceInfo` metadata with raw printer"
}
goal: IO (Lean.Option Bool)

full_name: Lean.pp.raw.maxDepth
code: register_builtin_option pp.raw.maxDepth : Nat := {
  defValue := 32
  group    := "pp"
  descr    := "(pretty printer) maximum `Syntax` depth for raw printer"
}
goal: Lean.Option Nat

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Util.PPExt._hyg.90
code: register_builtin_option pp.raw.maxDepth : Nat := {
  defValue := 32
  group    := "pp"
  descr    := "(pretty printer) maximum `Syntax` depth for raw printer"
}
goal: IO (Lean.Option Nat)

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Util.PPExt._hyg.132
code: register_builtin_option pp.rawOnError : Bool := {
  defValue := false
  group    := "pp"
  descr    := "(pretty printer) fallback to 'raw' printer when pretty printer fails"
}
goal: IO (Lean.Option Bool)

full_name: Lean.pp.rawOnError
code: register_builtin_option pp.rawOnError : Bool := {
  defValue := false
  group    := "pp"
  descr    := "(pretty printer) fallback to 'raw' printer when pretty printer fails"
}
goal: Lean.Option Bool

full_name: Lean.PPContext.mctx
code: structure PPContext where
  env           : Environment
  mctx          : MetavarContext := {}
  lctx          : LocalContext := {}
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
goal: Lean.MetavarContext

full_name: Lean.PPContext.env
code: structure PPContext where
  env           : Environment
  mctx          : MetavarContext := {}
  lctx          : LocalContext := {}
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
goal: Lean.Environment

full_name: Lean.PPContext
code: structure PPContext where
  env           : Environment
  mctx          : MetavarContext := {}
  lctx          : LocalContext := {}
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
goal: Type

full_name: Lean.PPContext.currNamespace
code: structure PPContext where
  env           : Environment
  mctx          : MetavarContext := {}
  lctx          : LocalContext := {}
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
goal: Lean.Name

full_name: Lean.PPContext.opts
code: structure PPContext where
  env           : Environment
  mctx          : MetavarContext := {}
  lctx          : LocalContext := {}
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
goal: Lean.Options

full_name: Lean.PPContext.lctx
code: structure PPContext where
  env           : Environment
  mctx          : MetavarContext := {}
  lctx          : LocalContext := {}
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
goal: Lean.LocalContext

full_name: Lean.PPContext.openDecls
code: structure PPContext where
  env           : Environment
  mctx          : MetavarContext := {}
  lctx          : LocalContext := {}
  opts          : Options := {}
  currNamespace : Name := Name.anonymous
  openDecls     : List OpenDecl := []
goal: List Lean.OpenDecl

full_name: Lean.PrettyPrinter.InfoPerPos
code: abbrev PrettyPrinter.InfoPerPos 
goal: Type

full_name: Lean.FormatWithInfos.fmt
code: /-- A format tree with `Elab.Info` annotations.
Each `.tag n _` node is annotated with `infos[n]`.
This is used to attach semantic data such as expressions
to pretty-printer outputs. -/
structure FormatWithInfos where
  fmt : Format
  infos : PrettyPrinter.InfoPerPos
goal: Lean.Format

full_name: Lean.FormatWithInfos.infos
code: /-- A format tree with `Elab.Info` annotations.
Each `.tag n _` node is annotated with `infos[n]`.
This is used to attach semantic data such as expressions
to pretty-printer outputs. -/
structure FormatWithInfos where
  fmt : Format
  infos : PrettyPrinter.InfoPerPos
goal: Lean.PrettyPrinter.InfoPerPos

full_name: Lean.FormatWithInfos
code: /-- A format tree with `Elab.Info` annotations.
Each `.tag n _` node is annotated with `infos[n]`.
This is used to attach semantic data such as expressions
to pretty-printer outputs. -/
structure FormatWithInfos where
  fmt : Format
  infos : PrettyPrinter.InfoPerPos
goal: Type

full_name: Lean.instCoeFormatFormatWithInfos
code: instance : Coe Format FormatWithInfos 
goal: Coe Lean.Format Lean.FormatWithInfos

full_name: Lean.PPFns.ppGoal
code: structure PPFns where
  ppExprWithInfos : PPContext → Expr → IO FormatWithInfos
  ppTerm : PPContext → Term → IO Format
  ppLevel : PPContext → Level → IO Format
  ppGoal : PPContext → MVarId → IO Format
  deriving Inhabited
goal: Lean.PPContext → Lean.MVarId → IO Lean.Format

full_name: Lean.PPFns.ppTerm
code: structure PPFns where
  ppExprWithInfos : PPContext → Expr → IO FormatWithInfos
  ppTerm : PPContext → Term → IO Format
  ppLevel : PPContext → Level → IO Format
  ppGoal : PPContext → MVarId → IO Format
  deriving Inhabited
goal: Lean.PPContext → Lean.Term → IO Lean.Format

full_name: Lean.PPFns.ppLevel
code: structure PPFns where
  ppExprWithInfos : PPContext → Expr → IO FormatWithInfos
  ppTerm : PPContext → Term → IO Format
  ppLevel : PPContext → Level → IO Format
  ppGoal : PPContext → MVarId → IO Format
  deriving Inhabited
goal: Lean.PPContext → Lean.Level → IO Lean.Format

full_name: Lean.PPFns
code: structure PPFns where
  ppExprWithInfos : PPContext → Expr → IO FormatWithInfos
  ppTerm : PPContext → Term → IO Format
  ppLevel : PPContext → Level → IO Format
  ppGoal : PPContext → MVarId → IO Format
  deriving Inhabited
goal: Type

full_name: Lean.PPFns.ppExprWithInfos
code: structure PPFns where
  ppExprWithInfos : PPContext → Expr → IO FormatWithInfos
  ppTerm : PPContext → Term → IO Format
  ppLevel : PPContext → Level → IO Format
  ppGoal : PPContext → MVarId → IO Format
  deriving Inhabited
goal: Lean.PPContext → Lean.Expr → IO Lean.FormatWithInfos

full_name: Lean.instInhabitedPPFns
code: structure PPFns where
  ppExprWithInfos : PPContext → Expr → IO FormatWithInfos
  ppTerm : PPContext → Term → IO Format
  ppLevel : PPContext → Level → IO Format
  ppGoal : PPContext → MVarId → IO Format
  deriving Inhabited
goal: Inhabited Lean.PPFns

full_name: Lean.ppFnsRef
code: builtin_initialize ppFnsRef : IO.Ref PPFns ←
  IO.mkRef {
    ppExprWithInfos := fun _ e => return format (toString e)
    ppTerm := fun ctx stx => return stx.raw.formatStx (some <| pp.raw.maxDepth.get ctx.opts)
    ppLevel := fun _ l => return format l
    ppGoal := fun _ _ => return "goal"
  }
goal: IO.Ref Lean.PPFns

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Util.PPExt._hyg.371
code: builtin_initialize ppFnsRef : IO.Ref PPFns ←
  IO.mkRef {
    ppExprWithInfos := fun _ e => return format (toString e)
    ppTerm := fun ctx stx => return stx.raw.formatStx (some <| pp.raw.maxDepth.get ctx.opts)
    ppLevel := fun _ l => return format l
    ppGoal := fun _ _ => return "goal"
  }
goal: IO (IO.Ref Lean.PPFns)

full_name: Lean.ppExt
code: builtin_initialize ppExt : EnvExtension PPFns ←
  registerEnvExtension ppFnsRef.get
goal: Lean.EnvExtension Lean.PPFns

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Util.PPExt._hyg.471
code: builtin_initialize ppExt : EnvExtension PPFns ←
  registerEnvExtension ppFnsRef.get
goal: IO (Lean.EnvExtension Lean.PPFns)

full_name: Lean.ppExprWithInfos
code: def ppExprWithInfos (ctx : PPContext) (e : Expr) : IO FormatWithInfos 
goal: IO Lean.FormatWithInfos

full_name: Lean.ppTerm
code: def ppTerm (ctx : PPContext) (stx : Term) : IO Format 
goal: IO Lean.Format

full_name: Lean.ppLevel
code: def ppLevel (ctx : PPContext) (l : Level) : IO Format 
goal: IO Lean.Format

full_name: Lean.ppGoal
code: def ppGoal (ctx : PPContext) (mvarId : MVarId) : IO Format 
goal: IO Lean.Format