@@ -94,7 +94,7 @@ private def MessageData.appendDescriptionWidgetIfNamed (msg : MessageData) : Mes
9494 }
9595 -- Note: we do not generate corresponding message data for the widget because it pollutes
9696 -- console output
97- msg.appendPreservingKind <| .ofWidget inst .nil
97+ msg.composePreservingKind <| .ofWidget inst .nil
9898 | none => msg
9999
100100/--
@@ -137,6 +137,15 @@ protected def «logNamedErrorAt» (ref : Syntax) (name : Name) (msgData : Messag
137137def logWarningAt [MonadOptions m] (ref : Syntax) (msgData : MessageData) : m Unit := do
138138 logAt ref msgData .warning
139139
140+ /--
141+ Log a named error warning using the given message data. The position is provided by `ref`.
142+
143+ Note: Use the macro `logNamedWarningAt`, which validates error names, instead of calling this function
144+ directly.
145+ -/
146+ protected def «logNamedWarningAt » (ref : Syntax) (name : Name) (msgData : MessageData) : m Unit :=
147+ logAt ref (msgData.tagWithErrorName name) MessageSeverity.warning
148+
140149/-- Log a new information message using the given message data. The position is provided by `ref`. -/
141150def logInfoAt (ref : Syntax) (msgData : MessageData) : m Unit :=
142151 logAt ref msgData MessageSeverity.information
@@ -164,6 +173,15 @@ protected def «logNamedError» (name : Name) (msgData : MessageData) : m Unit :
164173def logWarning [MonadOptions m] (msgData : MessageData) : m Unit := do
165174 log msgData .warning
166175
176+ /--
177+ Log a named warning using the given message data. The position is provided by `getRef`.
178+
179+ Note: Use the macro `logNamedWarning`, which validates error names, instead of calling this function
180+ directly.
181+ -/
182+ protected def «logNamedWarning » (name : Name) (msgData : MessageData) : m Unit :=
183+ log (msgData.tagWithErrorName name) MessageSeverity.warning
184+
167185/-- Log a new information message using the given message data. The position is provided by `getRef`. -/
168186def logInfo (msgData : MessageData) : m Unit :=
169187 log msgData MessageSeverity.information
0 commit comments