File: .lake/packages/lean4/src/lean/Lean/Message.lean

full_name: Lean.mkErrorStringWithPos
code: def mkErrorStringWithPos (fileName : String) (pos : Position) (msg : String) (endPos : Option Position := none) : String 
goal: String

full_name: Lean.MessageSeverity.warning
code: inductive MessageSeverity where
  | information | warning | error
  deriving Inhabited, BEq, ToJson, FromJson
goal: Lean.MessageSeverity

full_name: Lean.MessageSeverity
code: inductive MessageSeverity where
  | information | warning | error
  deriving Inhabited, BEq, ToJson, FromJson
goal: Type

full_name: Lean.MessageSeverity.information
code: inductive MessageSeverity where
  | information | warning | error
  deriving Inhabited, BEq, ToJson, FromJson
goal: Lean.MessageSeverity

full_name: Lean.MessageSeverity.error
code: inductive MessageSeverity where
  | information | warning | error
  deriving Inhabited, BEq, ToJson, FromJson
goal: Lean.MessageSeverity

full_name: Lean.instInhabitedMessageSeverity
code: inductive MessageSeverity where
  | information | warning | error
  deriving Inhabited, BEq, ToJson, FromJson
goal: Inhabited Lean.MessageSeverity

full_name: Lean.instBEqMessageSeverity
code: BEq
goal: BEq Lean.MessageSeverity

full_name: Lean.instToJsonMessageSeverity
code: ToJson
goal: Lean.ToJson Lean.MessageSeverity

full_name: Lean.instFromJsonMessageSeverity
code: FromJson
goal: Lean.FromJson Lean.MessageSeverity

full_name: Lean.MessageDataContext
code: structure MessageDataContext where
  env  : Environment
  mctx : MetavarContext
  lctx : LocalContext
  opts : Options
goal: Type

full_name: Lean.MessageDataContext.opts
code: structure MessageDataContext where
  env  : Environment
  mctx : MetavarContext
  lctx : LocalContext
  opts : Options
goal: Lean.Options

full_name: Lean.MessageDataContext.env
code: structure MessageDataContext where
  env  : Environment
  mctx : MetavarContext
  lctx : LocalContext
  opts : Options
goal: Lean.Environment

full_name: Lean.MessageDataContext.mctx
code: structure MessageDataContext where
  env  : Environment
  mctx : MetavarContext
  lctx : LocalContext
  opts : Options
goal: Lean.MetavarContext

full_name: Lean.MessageDataContext.lctx
code: structure MessageDataContext where
  env  : Environment
  mctx : MetavarContext
  lctx : LocalContext
  opts : Options
goal: Lean.LocalContext

full_name: Lean.NamingContext
code: /-- A naming context is the information needed to shorten names in pretty printing.

It gives the current namespace and the list of open declarations.
-/
structure NamingContext where
  currNamespace : Name
  openDecls : List OpenDecl
goal: Type

full_name: Lean.NamingContext.openDecls
code: /-- A naming context is the information needed to shorten names in pretty printing.

It gives the current namespace and the list of open declarations.
-/
structure NamingContext where
  currNamespace : Name
  openDecls : List OpenDecl
goal: List Lean.OpenDecl

full_name: Lean.NamingContext.currNamespace
code: /-- A naming context is the information needed to shorten names in pretty printing.

It gives the current namespace and the list of open declarations.
-/
structure NamingContext where
  currNamespace : Name
  openDecls : List OpenDecl
goal: Lean.Name

full_name: Lean.TraceData.cls
code: structure TraceData where
  /-- Trace class, e.g. `Elab.step`. -/
  cls       : Name
  /-- Start time in seconds; 0 if unknown to avoid `Option` allocation. -/
  startTime : Float := 0
  /-- Stop time in seconds; 0 if unknown to avoid `Option` allocation. -/
  stopTime  : Float := startTime
  /-- Whether trace node defaults to collapsed in the infoview. -/
  collapsed : Bool := true
  /-- Optional tag shown in `trace.profiler.output` output after the trace class name. -/
  tag       : String := ""
goal: Lean.Name

full_name: Lean.TraceData.stopTime
code: structure TraceData where
  /-- Trace class, e.g. `Elab.step`. -/
  cls       : Name
  /-- Start time in seconds; 0 if unknown to avoid `Option` allocation. -/
  startTime : Float := 0
  /-- Stop time in seconds; 0 if unknown to avoid `Option` allocation. -/
  stopTime  : Float := startTime
  /-- Whether trace node defaults to collapsed in the infoview. -/
  collapsed : Bool := true
  /-- Optional tag shown in `trace.profiler.output` output after the trace class name. -/
  tag       : String := ""
goal: Float

full_name: Lean.TraceData
code: structure TraceData where
  /-- Trace class, e.g. `Elab.step`. -/
  cls       : Name
  /-- Start time in seconds; 0 if unknown to avoid `Option` allocation. -/
  startTime : Float := 0
  /-- Stop time in seconds; 0 if unknown to avoid `Option` allocation. -/
  stopTime  : Float := startTime
  /-- Whether trace node defaults to collapsed in the infoview. -/
  collapsed : Bool := true
  /-- Optional tag shown in `trace.profiler.output` output after the trace class name. -/
  tag       : String := ""
goal: Type

full_name: Lean.TraceData.startTime
code: structure TraceData where
  /-- Trace class, e.g. `Elab.step`. -/
  cls       : Name
  /-- Start time in seconds; 0 if unknown to avoid `Option` allocation. -/
  startTime : Float := 0
  /-- Stop time in seconds; 0 if unknown to avoid `Option` allocation. -/
  stopTime  : Float := startTime
  /-- Whether trace node defaults to collapsed in the infoview. -/
  collapsed : Bool := true
  /-- Optional tag shown in `trace.profiler.output` output after the trace class name. -/
  tag       : String := ""
goal: Float

full_name: Lean.TraceData.collapsed
code: structure TraceData where
  /-- Trace class, e.g. `Elab.step`. -/
  cls       : Name
  /-- Start time in seconds; 0 if unknown to avoid `Option` allocation. -/
  startTime : Float := 0
  /-- Stop time in seconds; 0 if unknown to avoid `Option` allocation. -/
  stopTime  : Float := startTime
  /-- Whether trace node defaults to collapsed in the infoview. -/
  collapsed : Bool := true
  /-- Optional tag shown in `trace.profiler.output` output after the trace class name. -/
  tag       : String := ""
goal: Bool

full_name: Lean.TraceData.tag
code: structure TraceData where
  /-- Trace class, e.g. `Elab.step`. -/
  cls       : Name
  /-- Start time in seconds; 0 if unknown to avoid `Option` allocation. -/
  startTime : Float := 0
  /-- Stop time in seconds; 0 if unknown to avoid `Option` allocation. -/
  stopTime  : Float := startTime
  /-- Whether trace node defaults to collapsed in the infoview. -/
  collapsed : Bool := true
  /-- Optional tag shown in `trace.profiler.output` output after the trace class name. -/
  tag       : String := ""
goal: String

full_name: Lean.MessageData.compose
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.MessageData → Lean.MessageData → Lean.MessageData

full_name: Lean.MessageData.trace
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.MessageData

full_name: Lean.MessageData.ofGoal
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.MVarId → Lean.MessageData

full_name: Lean.MessageData.ofWidget
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.Widget.WidgetInstance → Lean.MessageData → Lean.MessageData

full_name: Lean.MessageData.ofFormatWithInfos
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.FormatWithInfos → Lean.MessageData

full_name: Lean.MessageData.group
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.MessageData → Lean.MessageData

full_name: Lean.MessageData.withContext
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.MessageDataContext → Lean.MessageData → Lean.MessageData

full_name: Lean.MessageData.nest
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Nat → Lean.MessageData → Lean.MessageData

full_name: Lean.MessageData.tagged
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.Name → Lean.MessageData → Lean.MessageData

full_name: Lean.MessageData
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Type

full_name: Lean.MessageData.ofLazy
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.MessageData

full_name: Lean.instInhabitedMessageData
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Inhabited Lean.MessageData

full_name: Lean.MessageData.withNamingContext
code: /-- Structured message data. We use it for reporting errors, trace messages, etc. -/
inductive MessageData where
  /-- Eagerly formatted text with info annotations.
  This constructor is inspected in various hacks. -/
  | ofFormatWithInfos : FormatWithInfos → MessageData
  | ofGoal            : MVarId → MessageData
  /-- A widget instance.

  In `ofWidget wi alt`,
  the nested message `alt` should approximate the contents of the widget
  without itself using `ofWidget wi _`.
  This is used as fallback in environments that cannot display user widgets.
  `alt` may nest any structured message,
  for example `ofGoal` to approximate a tactic state widget,
  and, if necessary, even other widget instances
  (for which approximations are computed recursively). -/
  | ofWidget          : Widget.WidgetInstance → MessageData → MessageData
  /-- `withContext ctx d` specifies the pretty printing context `(env, mctx, lctx, opts)` for the nested expressions in `d`. -/
  | withContext       : MessageDataContext → MessageData → MessageData
  | withNamingContext : NamingContext → MessageData → MessageData
  /-- Lifted `Format.nest` -/
  | nest              : Nat → MessageData → MessageData
  /-- Lifted `Format.group` -/
  | group             : MessageData → MessageData
  /-- Lifted `Format.compose` -/
  | compose           : MessageData → MessageData → MessageData
  /-- Tagged sections. `Name` should be viewed as a "kind", and is used by `MessageData` inspector functions.
    Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". -/
  | tagged            : Name → MessageData → MessageData
  | trace (data : TraceData) (msg : MessageData) (children : Array MessageData)
  /-- A lazy message.
  The provided thunk will not be run until it is about to be displayed.
  This can save computation in cases where the message may never be seen.

  The `Dynamic` value is expected to be a `MessageData`,
  which is a workaround for the positivity restriction.

  If the thunked message is produced for a term that contains a synthetic sorry,
  `hasSyntheticSorry` should return `true`.
  This is used to filter out certain messages. -/
  | ofLazy (f : Option PPContext → IO Dynamic) (hasSyntheticSorry : MetavarContext → Bool)
  deriving Inhabited, TypeName
goal: Lean.NamingContext → Lean.MessageData → Lean.MessageData

full_name: Lean.instTypeNameMessageData
code: TypeName
goal: TypeName Lean.MessageData

full_name: Lean.instImpl._@..lake.packages.lean4.src.lean.Lean.Message._hyg.596
code: TypeName
goal: TypeName Lean.MessageData

full_name: Lean.inst._@..lake.packages.lean4.src.lean.Lean.Message._hyg.596
code: TypeName
goal: TypeName Lean.MessageData

full_name: Lean.MessageData.ofFormat
code: /-- Eagerly formatted text. -/
def ofFormat (fmt : Format) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.lazy
code: /--
Lazy message data production, with access to the context as given by
a surrounding `MessageData.withContext` (which is expected to exist).
-/
def lazy (f : PPContext → IO MessageData)
    (hasSyntheticSorry : MetavarContext → Bool := fun _ => false) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.hasTag
code: /-- Returns true when the message contains a `MessageData.tagged tag ..` constructor where `p tag`
is true.

This does not descend into lazily generated subtress (`.ofLazy`); message tags
of interest (like those added by `logLinter`) are expected to be near the root
of the `MessageData`, and not hidden inside `.ofLazy`.
-/
partial def hasTag : MessageData → Bool
  
goal: Lean.MessageData → Bool

full_name: Lean.MessageData.nil
code: /-- An empty message. -/
def nil : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.mkPPContext
code: def mkPPContext (nCtx : NamingContext) (ctx : MessageDataContext) : PPContext 
goal: Lean.PPContext

full_name: Lean.MessageData.ofSyntax
code: def ofSyntax (stx : Syntax) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.ofExpr
code: def ofExpr (e : Expr) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.ofLevel
code: def ofLevel (l : Level) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.ofName
code: def ofName (n : Name) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.hasSyntheticSorry.visit
code: partial def hasSyntheticSorry (msg : MessageData) : Bool 
goal: Lean.MessageData → Bool

full_name: Lean.MessageData.hasSyntheticSorry
code: partial def hasSyntheticSorry (msg : MessageData) : Bool 
goal: Bool

full_name: Lean.MessageData.formatAux
code: partial def formatAux : NamingContext → Option MessageDataContext → MessageData → IO Format
  
goal: Lean.NamingContext → Option Lean.MessageDataContext → Lean.MessageData → IO Lean.Format

full_name: Lean.MessageData.format
code: protected def format (msgData : MessageData) : IO Format 
goal: IO Lean.Format

full_name: Lean.MessageData.toString
code: protected def toString (msgData : MessageData) : IO String 
goal: IO String

full_name: Lean.MessageData.instAppend
code: instance : Append MessageData 
goal: Append Lean.MessageData

full_name: Lean.MessageData.instCoeString
code: instance : Coe String MessageData 
goal: Coe String Lean.MessageData

full_name: Lean.MessageData.instCoeFormat
code: instance : Coe Format MessageData 
goal: Coe Lean.Format Lean.MessageData

full_name: Lean.MessageData.instCoeLevel
code: instance : Coe Level MessageData  
goal: Coe Lean.Level Lean.MessageData

full_name: Lean.MessageData.instCoeExpr
code: instance : Coe Expr MessageData   
goal: Coe Lean.Expr Lean.MessageData

full_name: Lean.MessageData.instCoeName
code: instance : Coe Name MessageData   
goal: Coe Lean.Name Lean.MessageData

full_name: Lean.MessageData.instCoeSyntax
code: instance : Coe Syntax MessageData 
goal: Coe Lean.Syntax Lean.MessageData

full_name: Lean.MessageData.instCoeMVarId
code: instance : Coe MVarId MessageData 
goal: Coe Lean.MVarId Lean.MessageData

full_name: Lean.MessageData.instCoeOptionExpr
code: instance : Coe (Option Expr) MessageData 
goal: Coe (Option Lean.Expr) Lean.MessageData

full_name: Lean.MessageData.arrayExpr.toMessageData
code: partial def arrayExpr.toMessageData (es : Array Expr) (i : Nat) (acc : MessageData) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.instCoeArrayExpr
code: instance : Coe (Array Expr) MessageData 
goal: Coe (Array Lean.Expr) Lean.MessageData

full_name: Lean.MessageData.bracket
code: /-- Wrap the given message in `l` and `r`. See also `Format.bracket`.  -/
def bracket (l : String) (f : MessageData) (r : String) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.paren
code: /-- Wrap the given message in parentheses `()`. -/
def paren (f : MessageData) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.sbracket
code: /-- Wrap the given message in square brackets `[]`. -/
def sbracket (f : MessageData) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.joinSep
code: /-- Append the given list of messages with the given separator. -/
def joinSep : List MessageData → MessageData → MessageData
  
goal: List Lean.MessageData → Lean.MessageData → Lean.MessageData

full_name: Lean.MessageData.ofList
code: /-- Write the given list of messages as a list, separating each item with `,\n` and surrounding with square brackets. -/
def ofList : List MessageData → MessageData
  
goal: List Lean.MessageData → Lean.MessageData

full_name: Lean.MessageData.ofArray
code: /-- See `MessageData.ofList`. -/
def ofArray (msgs : Array MessageData) : MessageData 
goal: Lean.MessageData

full_name: Lean.MessageData.instCoeList
code: instance : Coe (List MessageData) MessageData 
goal: Coe (List Lean.MessageData) Lean.MessageData

full_name: Lean.MessageData.instCoeListExpr
code: instance : Coe (List Expr) MessageData 
goal: Coe (List Lean.Expr) Lean.MessageData

full_name: Lean.BaseMessage.endPos
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: Option Lean.Position

full_name: Lean.BaseMessage.fileName
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: String

full_name: Lean.BaseMessage.caption
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: String

full_name: Lean.BaseMessage.keepFullRange
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: Bool

full_name: Lean.BaseMessage.severity
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: Lean.MessageSeverity

full_name: Lean.BaseMessage
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: Type u

full_name: Lean.BaseMessage.pos
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: Lean.Position

full_name: Lean.BaseMessage.data
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: α

full_name: Lean.instInhabitedBaseMessage
code: /--
A `BaseMessage` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows.
There are two varieties in the Lean core:
* `Message`: Uses structured, effectful `MessageData` for formatting content.
* `SerialMessage`: Stores pure `String` data. Obtained by running the effectful
`Message.serialize`.
-/
structure BaseMessage (α : Type u) where
  fileName      : String
  pos           : Position
  endPos        : Option Position := none
  /-- If `true`, report range as given; see `msgToInteractiveDiagnostic`. -/
  keepFullRange : Bool := false
  severity      : MessageSeverity := MessageSeverity.error
  caption       : String          := ""
  /-- The content of the message. -/
  data          : α
  deriving Inhabited, ToJson, FromJson
goal: {a : Type u_1} → [inst : Inhabited a] → Inhabited (Lean.BaseMessage a)

full_name: Lean.instToJsonBaseMessage
code: ToJson
goal: {α : Type u_1} → [inst : Lean.ToJson α] → Lean.ToJson (Lean.BaseMessage α)

full_name: Lean.instFromJsonBaseMessage
code: FromJson
goal: {α : Type} → [inst : Lean.FromJson α] → Lean.FromJson (Lean.BaseMessage α)

full_name: Lean.Message
code: /-- A `Message` is a richly formatted piece of information emitted by Lean.
They are rendered by client editors in the infoview and in diagnostic windows. -/
abbrev Message 
goal: Type

full_name: Lean.SerialMessage
code: /-- A `SerialMessage` is a `Message` whose `MessageData` has been eagerly
serialized and is thus appropriate for use in pure contexts where the effectful
`MessageData.toString` cannot be used. -/
abbrev SerialMessage 
goal: Type

full_name: Lean.SerialMessage.toMessage
code: @[inline] def toMessage (msg : SerialMessage) : Message 
goal: Lean.Message

full_name: Lean.SerialMessage.toString
code: protected def toString (msg : SerialMessage) (includeEndPos := false) : String 
goal: String

full_name: Lean.SerialMessage.instToString
code: instance : ToString SerialMessage 
goal: ToString Lean.SerialMessage

full_name: Lean.Message.serialize
code: @[inline] def serialize (msg : Message) : IO SerialMessage 
goal: IO Lean.SerialMessage

full_name: Lean.Message.toString
code: protected def toString (msg : Message) (includeEndPos := false) : IO String 
goal: IO String

full_name: Lean.Message.toJson
code: protected def toJson (msg : Message) : IO Json 
goal: IO Lean.Json

full_name: Lean.instInhabitedMessageLog
code: /--
A persistent array of messages.

In the Lean elaborator, we use a fresh message log per command but may also report diagnostics at
various points inside a command, which will empty `unreported` and updated `hadErrors` accordingly
(see `CoreM.getAndEmptyMessageLog`).
-/
structure MessageLog where
  /--
  If true, there was an error in the log previously that has already been reported to the user and
  removed from the log. Thus we say that in the current context (usually the current command), we
  "have errors" if either this flag is set or there is an error in `msgs`; see
  `MessageLog.hasErrors`. If we have errors, we suppress some error messages that are often the
  result of a previous error.
  -/
  /-
  Design note: We considered introducing a `hasErrors` field instead that already includes the
  presence of errors in `msgs` but this would not be compatible with e.g.
  `MessageLog.errorsToWarnings`.
  -/
  hadErrors : Bool := false
  /-- The list of messages not already reported, in insertion order. -/
  unreported : PersistentArray Message := {}
  deriving Inhabited
goal: Inhabited Lean.MessageLog

full_name: Lean.MessageLog
code: /--
A persistent array of messages.

In the Lean elaborator, we use a fresh message log per command but may also report diagnostics at
various points inside a command, which will empty `unreported` and updated `hadErrors` accordingly
(see `CoreM.getAndEmptyMessageLog`).
-/
structure MessageLog where
  /--
  If true, there was an error in the log previously that has already been reported to the user and
  removed from the log. Thus we say that in the current context (usually the current command), we
  "have errors" if either this flag is set or there is an error in `msgs`; see
  `MessageLog.hasErrors`. If we have errors, we suppress some error messages that are often the
  result of a previous error.
  -/
  /-
  Design note: We considered introducing a `hasErrors` field instead that already includes the
  presence of errors in `msgs` but this would not be compatible with e.g.
  `MessageLog.errorsToWarnings`.
  -/
  hadErrors : Bool := false
  /-- The list of messages not already reported, in insertion order. -/
  unreported : PersistentArray Message := {}
  deriving Inhabited
goal: Type

full_name: Lean.MessageLog.hadErrors
code: /--
A persistent array of messages.

In the Lean elaborator, we use a fresh message log per command but may also report diagnostics at
various points inside a command, which will empty `unreported` and updated `hadErrors` accordingly
(see `CoreM.getAndEmptyMessageLog`).
-/
structure MessageLog where
  /--
  If true, there was an error in the log previously that has already been reported to the user and
  removed from the log. Thus we say that in the current context (usually the current command), we
  "have errors" if either this flag is set or there is an error in `msgs`; see
  `MessageLog.hasErrors`. If we have errors, we suppress some error messages that are often the
  result of a previous error.
  -/
  /-
  Design note: We considered introducing a `hasErrors` field instead that already includes the
  presence of errors in `msgs` but this would not be compatible with e.g.
  `MessageLog.errorsToWarnings`.
  -/
  hadErrors : Bool := false
  /-- The list of messages not already reported, in insertion order. -/
  unreported : PersistentArray Message := {}
  deriving Inhabited
goal: Bool

full_name: Lean.MessageLog.unreported
code: /--
A persistent array of messages.

In the Lean elaborator, we use a fresh message log per command but may also report diagnostics at
various points inside a command, which will empty `unreported` and updated `hadErrors` accordingly
(see `CoreM.getAndEmptyMessageLog`).
-/
structure MessageLog where
  /--
  If true, there was an error in the log previously that has already been reported to the user and
  removed from the log. Thus we say that in the current context (usually the current command), we
  "have errors" if either this flag is set or there is an error in `msgs`; see
  `MessageLog.hasErrors`. If we have errors, we suppress some error messages that are often the
  result of a previous error.
  -/
  /-
  Design note: We considered introducing a `hasErrors` field instead that already includes the
  presence of errors in `msgs` but this would not be compatible with e.g.
  `MessageLog.errorsToWarnings`.
  -/
  hadErrors : Bool := false
  /-- The list of messages not already reported, in insertion order. -/
  unreported : PersistentArray Message := {}
  deriving Inhabited
goal: Lean.PersistentArray Lean.Message

full_name: Lean.MessageLog.empty
code: def empty : MessageLog 
goal: Lean.MessageLog

full_name: Lean.MessageLog.msgs
code: @[deprecated "renamed to `unreported`; direct access should in general be avoided in favor of \
using `MessageLog.toList/toArray`"]
def msgs : MessageLog → PersistentArray Message 
goal: Lean.MessageLog → Lean.PersistentArray Lean.Message

full_name: Lean.MessageLog.hasUnreported
code: def hasUnreported (log : MessageLog) : Bool 
goal: Bool

full_name: Lean.MessageLog.add
code: def add (msg : Message) (log : MessageLog) : MessageLog 
goal: Lean.MessageLog

full_name: Lean.MessageLog.append
code: protected def append (l₁ l₂ : MessageLog) : MessageLog 
goal: Lean.MessageLog

full_name: Lean.MessageLog.instAppend
code: instance : Append MessageLog 
goal: Append Lean.MessageLog

full_name: Lean.MessageLog.hasErrors
code: def hasErrors (log : MessageLog) : Bool 
goal: Bool

full_name: Lean.MessageLog.errorsToWarnings
code: def errorsToWarnings (log : MessageLog) : MessageLog 
goal: Lean.MessageLog

full_name: Lean.MessageLog.getInfoMessages
code: def getInfoMessages (log : MessageLog) : MessageLog 
goal: Lean.MessageLog

full_name: Lean.MessageLog.forM
code: def forM {m : Type → Type} [Monad m] (log : MessageLog) (f : Message → m Unit) : m Unit 
goal: m Unit

full_name: Lean.MessageLog.toList
code: /-- Converts the unreported messages to a list, oldest message first. -/
def toList (log : MessageLog) : List Message 
goal: List Lean.Message

full_name: Lean.MessageLog.toArray
code: /-- Converts the unreported messages to an array, oldest message first. -/
def toArray (log : MessageLog) : Array Message 
goal: Array Lean.Message

full_name: Lean.MessageData.nestD
code: def MessageData.nestD (msg : MessageData) : MessageData 
goal: Lean.MessageData

full_name: Lean.indentD
code: def indentD (msg : MessageData) : MessageData 
goal: Lean.MessageData

full_name: Lean.indentExpr
code: def indentExpr (e : Expr) : MessageData 
goal: Lean.MessageData

full_name: Lean.AddMessageContext.addMessageContext
code: class AddMessageContext (m : Type → Type) where
  /-- 
  Without context, a `MessageData` object may be be missing information
  (e.g. hover info) for pretty printing, or may print an error. Hence,
  `addMessageContext` should be called on all constructed `MessageData`
  (e.g. via `m!`) before taking it out of context (e.g. leaving `MetaM` or
  `CoreM`).
  -/
  addMessageContext : MessageData → m MessageData
goal: Lean.MessageData → m Lean.MessageData

full_name: Lean.AddMessageContext
code: class AddMessageContext (m : Type → Type) where
  /-- 
  Without context, a `MessageData` object may be be missing information
  (e.g. hover info) for pretty printing, or may print an error. Hence,
  `addMessageContext` should be called on all constructed `MessageData`
  (e.g. via `m!`) before taking it out of context (e.g. leaving `MetaM` or
  `CoreM`).
  -/
  addMessageContext : MessageData → m MessageData
goal: Type

full_name: Lean.instAddMessageContextOfMonadLift
code: instance (m n) [MonadLift m n] [AddMessageContext m] : AddMessageContext n 
goal: Lean.AddMessageContext n

full_name: Lean.addMessageContextPartial
code: def addMessageContextPartial {m} [Monad m] [MonadEnv m] [MonadOptions m] (msgData : MessageData) : m MessageData 
goal: m Lean.MessageData

full_name: Lean.addMessageContextFull
code: def addMessageContextFull {m} [Monad m] [MonadEnv m] [MonadMCtx m] [MonadLCtx m] [MonadOptions m] (msgData : MessageData) : m MessageData 
goal: m Lean.MessageData

full_name: Lean.ToMessageData.toMessageData
code: class ToMessageData (α : Type) where
  toMessageData : α → MessageData
goal: α → Lean.MessageData

full_name: Lean.ToMessageData
code: class ToMessageData (α : Type) where
  toMessageData : α → MessageData
goal: Type

full_name: Lean.stringToMessageData
code: def stringToMessageData (str : String) : MessageData 
goal: Lean.MessageData

full_name: Lean.instToMessageDataOfToFormat
code: instance [ToFormat α] : ToMessageData α 
goal: Lean.ToMessageData α

full_name: Lean.instToMessageDataExpr
code: instance : ToMessageData Expr          
goal: Lean.ToMessageData Lean.Expr

full_name: Lean.instToMessageDataLevel
code: instance : ToMessageData Level         
goal: Lean.ToMessageData Lean.Level

full_name: Lean.instToMessageDataName
code: instance : ToMessageData Name          
goal: Lean.ToMessageData Lean.Name

full_name: Lean.instToMessageDataString
code: instance : ToMessageData String        
goal: Lean.ToMessageData String

full_name: Lean.instToMessageDataSyntax
code: instance : ToMessageData Syntax        
goal: Lean.ToMessageData Lean.Syntax

full_name: Lean.instToMessageDataTSyntax
code: instance : ToMessageData (TSyntax k)   
goal: Lean.ToMessageData (Lean.TSyntax k)

full_name: Lean.instToMessageDataFormat
code: instance : ToMessageData Format        
goal: Lean.ToMessageData Lean.Format

full_name: Lean.instToMessageDataMVarId
code: instance : ToMessageData MVarId        
goal: Lean.ToMessageData Lean.MVarId

full_name: Lean.instToMessageDataMessageData
code: instance : ToMessageData MessageData   
goal: Lean.ToMessageData Lean.MessageData

full_name: Lean.instToMessageDataList
code: instance [ToMessageData α] : ToMessageData (List α)  
goal: Lean.ToMessageData (List α)

full_name: Lean.instToMessageDataArray
code: instance [ToMessageData α] : ToMessageData (Array α) 
goal: Lean.ToMessageData (Array α)

full_name: Lean.instToMessageDataSubarray
code: instance [ToMessageData α] : ToMessageData (Subarray α) 
goal: Lean.ToMessageData (Subarray α)

full_name: Lean.instToMessageDataOption
code: instance [ToMessageData α] : ToMessageData (Option α) 
goal: Lean.ToMessageData (Option α)

full_name: Lean.instToMessageDataProd
code: instance [ToMessageData α] [ToMessageData β] : ToMessageData (α × β) 
goal: Lean.ToMessageData (α × β)

full_name: Lean.instToMessageDataOptionExpr
code: instance : ToMessageData (Option Expr) 
goal: Lean.ToMessageData (Option Lean.Expr)

full_name: Lean.termM!_
code: syntax:max "m!" interpolatedStr(term) : term
goal: Lean.ParserDescr

full_name: Lean.«_aux_.lake_packages_lean4_src_lean_Lean_Message___macroRules_Lean_termM!__1»
code: macro_rules
  | `(m! $interpStr) => do interpStr.expandInterpolatedStr (← `(MessageData)) (← `(toMessageData))
goal: Lean.Macro

full_name: Lean.toMessageList
code: def toMessageList (msgs : Array MessageData) : MessageData 
goal: Lean.MessageData

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Message.0.Lean.KernelException.mkCtx
code: private def mkCtx (env : Environment) (lctx : LocalContext) (opts : Options) (msg : MessageData) : MessageData 
goal: Lean.MessageData

full_name: Lean.KernelException.toMessageData
code: def toMessageData (e : KernelException) (opts : Options) : MessageData 
goal: Lean.MessageData