Equations
- One or more equations did not get rendered due to their size.
Instances For
- information: Lean.MessageSeverity
- warning: Lean.MessageSeverity
- error: Lean.MessageSeverity
Instances For
Equations
- Lean.instInhabitedMessageSeverity = { default := Lean.MessageSeverity.information }
Equations
- Lean.instBEqMessageSeverity = { beq := Lean.beqMessageSeverity✝ }
Equations
- Lean.instToJsonMessageSeverity = { toJson := Lean.toJsonMessageSeverity✝ }
Equations
- Lean.instFromJsonMessageSeverity = { fromJson? := Lean.fromJsonMessageSeverity✝ }
- env : Lean.Environment
- mctx : Lean.MetavarContext
- lctx : Lean.LocalContext
- opts : Lean.Options
Instances For
A naming context is the information needed to shorten names in pretty printing.
It gives the current namespace and the list of open declarations.
- currNamespace : Lake.Name
- openDecls : List Lean.OpenDecl
Instances For
Lazily formatted text to be used in MessageData
.
Pretty-prints text using surrounding context, if any.
- hasSyntheticSorry : Lean.MetavarContext → Bool
Searches for synthetic sorries in original input. Used to filter out certain messages.
Instances For
- cls : Lake.Name
Trace class, e.g.
Elab.step
. - startTime : Float
Start time in seconds; 0 if unknown to avoid
Option
allocation. - stopTime : Float
Stop time in seconds; 0 if unknown to avoid
Option
allocation. - collapsed : Bool
Whether trace node defaults to collapsed in the infoview.
- tag : String
Optional tag shown in
trace.profiler.output
output after the trace class name.
Instances For
Structured message data. We use it for reporting errors, trace messages, etc.
- ofFormat: Lean.Format → Lean.MessageData
Eagerly formatted text. We inspect this in various hacks, so it is not immediately subsumed by
ofPPFormat
. - ofPPFormat: Lean.PPFormat → Lean.MessageData
Lazily formatted text.
- ofGoal: Lean.MVarId → Lean.MessageData
- withContext: Lean.MessageDataContext → Lean.MessageData → Lean.MessageData
withContext ctx d
specifies the pretty printing context(env, mctx, lctx, opts)
for the nested expressions ind
. - withNamingContext: Lean.NamingContext → Lean.MessageData → Lean.MessageData
- nest: Nat → Lean.MessageData → Lean.MessageData
Lifted
Format.nest
- group: Lean.MessageData → Lean.MessageData
Lifted
Format.group
- compose: Lean.MessageData → Lean.MessageData → Lean.MessageData
Lifted
Format.compose
- tagged: Lake.Name → Lean.MessageData → Lean.MessageData
Tagged sections.
Name
should be viewed as a "kind", and is used byMessageData
inspector functions. Example: an inspector that tries to find "definitional equality failures" may look for the tag "DefEqFailure". - trace: Lean.TraceData → Lean.MessageData → Array Lean.MessageData → Lean.MessageData
Instances For
Equations
- Lean.instInhabitedMessageData = { default := Lean.MessageData.ofFormat default }
Returns true when the message contains a MessageData.tagged tag ..
constructor where p tag
is true.
An empty message.
Instances For
Equations
- Lean.MessageData.mkPPContext nCtx ctx = { env := ctx.env, mctx := ctx.mctx, lctx := ctx.lctx, opts := ctx.opts, currNamespace := nCtx.currNamespace, openDecls := nCtx.openDecls }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- msg.hasSyntheticSorry = Lean.MessageData.hasSyntheticSorry.visit none msg
Instances For
Equations
- msgData.format = Lean.MessageData.formatAux { currNamespace := Lean.Name.anonymous, openDecls := [] } none msgData
Instances For
Instances For
Equations
- Lean.MessageData.instAppend = { append := Lean.MessageData.compose }
Equations
- Lean.MessageData.instCoeString = { coe := Lean.MessageData.ofFormat ∘ Std.format }
Equations
Equations
Equations
- Lean.MessageData.instCoeExpr = { coe := Lean.MessageData.ofExpr }
Equations
- Lean.MessageData.instCoeName = { coe := Lean.MessageData.ofName }
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.MessageData.instCoeArrayExpr = { coe := fun (es : Array Lean.Expr) => Lean.MessageData.arrayExpr.toMessageData es 0 ((Lean.MessageData.ofFormat ∘ Std.format) "#[") }
Wrap the given message in l
and r
. See also Format.bracket
.
Equations
- Lean.MessageData.bracket l f r = (Lean.MessageData.nest l.length ((Lean.MessageData.ofFormat ∘ Std.format) l ++ f ++ (Lean.MessageData.ofFormat ∘ Std.format) r)).group
Instances For
Wrap the given message in parentheses ()
.
Equations
- f.paren = Lean.MessageData.bracket "(" f ")"
Instances For
Wrap the given message in square brackets []
.
Equations
- f.sbracket = Lean.MessageData.bracket "[" f "]"
Instances For
Append the given list of messages with the given separator.
Equations
- Lean.MessageData.joinSep [] x = Lean.MessageData.ofFormat Lean.Format.nil
- Lean.MessageData.joinSep [a] x = a
- Lean.MessageData.joinSep (a :: as) x = a ++ x ++ Lean.MessageData.joinSep as x
Instances For
Write the given list of messages as a list, separating each item with ,\n
and surrounding with square brackets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
See MessageData.ofList
.
Equations
- Lean.MessageData.ofArray msgs = Lean.MessageData.ofList msgs.toList
Instances For
Equations
- Lean.MessageData.instCoeList = { coe := Lean.MessageData.ofList }
Equations
- Lean.MessageData.instCoeListExpr = { coe := fun (es : List Lean.Expr) => Lean.MessageData.ofList (List.map Lean.MessageData.ofExpr es) }
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, effectfulMessageData
for formatting content.SerialMessage
: Stores pureString
data. Obtained by running the effectfulMessage.serialize
.
- fileName : String
- pos : Lean.Position
- endPos : Option Lean.Position
- keepFullRange : Bool
If
true
, report range as given; seemsgToInteractiveDiagnostic
. - severity : Lean.MessageSeverity
- caption : String
- data : α
The content of the message.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instToJsonBaseMessage = { toJson := Lean.toJsonBaseMessage✝ }
Equations
- Lean.instFromJsonBaseMessage = { fromJson? := Lean.fromJsonBaseMessage✝ }
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.
Equations
Instances For
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.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.SerialMessage.instToString = { toString := fun (msg : Lean.SerialMessage) => msg.toString }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- msg.toJson = do let __do_lift ← msg.serialize pure (inline (Lean.toJson __do_lift))
Instances For
Equations
- Lean.instInhabitedMessageLog = { default := { msgs := default } }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- log.isEmpty = log.msgs.isEmpty
Instances For
Equations
- Lean.MessageLog.add msg log = { msgs := log.msgs.push msg }
Instances For
Instances For
Equations
- Lean.MessageLog.instAppend = { append := Lean.MessageLog.append }
Equations
- log.hasErrors = log.msgs.any fun (m : Lean.Message) => match m.severity with | Lean.MessageSeverity.error => true | x => false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- log.getInfoMessages = { msgs := log.msgs.filter fun (m : Lean.Message) => match m.severity with | Lean.MessageSeverity.information => true | x => false }
Instances For
Equations
- log.forM f = log.msgs.forM f
Instances For
Converts the log to an array, oldest message first.
Equations
- log.toArray = log.msgs.toArray
Instances For
Equations
- msg.nestD = Lean.MessageData.nest 2 msg
Instances For
Equations
- Lean.indentD msg = (Lean.MessageData.ofFormat Lean.Format.line ++ msg).nestD
Instances For
Equations
Instances For
- addMessageContext : Lean.MessageData → m Lean.MessageData
Instances
Equations
- Lean.instAddMessageContextOfMonadLift m n = { addMessageContext := fun (msg : Lean.MessageData) => liftM (Lean.addMessageContext msg) }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.instToMessageDataOfToFormat = { toMessageData := Lean.MessageData.ofFormat ∘ Std.format }
Equations
- Lean.instToMessageDataExpr = { toMessageData := Lean.MessageData.ofExpr }
Equations
- Lean.instToMessageDataLevel = { toMessageData := Lean.MessageData.ofLevel }
Equations
- Lean.instToMessageDataName = { toMessageData := Lean.MessageData.ofName }
Equations
- Lean.instToMessageDataString = { toMessageData := Lean.stringToMessageData }
Equations
- Lean.instToMessageDataSyntax = { toMessageData := Lean.MessageData.ofSyntax }
Equations
- Lean.instToMessageDataTSyntax = { toMessageData := fun (x : Lean.TSyntax k) => Lean.MessageData.ofSyntax x.raw }
Equations
- Lean.instToMessageDataFormat = { toMessageData := Lean.MessageData.ofFormat }
Equations
- Lean.instToMessageDataMVarId = { toMessageData := Lean.MessageData.ofGoal }
Equations
- Lean.instToMessageDataMessageData = { toMessageData := id }
Equations
- Lean.instToMessageDataList = { toMessageData := fun (as : List α) => Lean.MessageData.ofList (List.map Lean.toMessageData as) }
Equations
- Lean.instToMessageDataArray = { toMessageData := fun (as : Array α) => Lean.toMessageData as.toList }
Equations
- Lean.instToMessageDataSubarray = { toMessageData := fun (as : Subarray α) => Lean.toMessageData as.toArray.toList }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.toMessageList msgs = Lean.indentD (Lean.MessageData.joinSep msgs.toList (Lean.toMessageData "\n\n"))
Instances For
Equations
- One or more equations did not get rendered due to their size.