#guard_msgs command for testing commands
This module defines a command to test that another command produces the expected messages.
See the docstring on the #guard_msgs command.
The decision made by a specification for a message.
- check : FilterSpecCapture the message and check it matches the docstring. 
- drop : FilterSpecDrop the message and delete it. 
- pass : FilterSpecDo not capture the message. 
Instances For
The method to use when normalizing whitespace, after trimming.
- exact : WhitespaceModeExact equality. 
- normalized : WhitespaceModeEquality after normalizing newlines into spaces. 
- lax : WhitespaceModeEquality after collapsing whitespace into single spaces. 
Instances For
Method to use when combining multiple messages.
- exact : MessageOrderingUse the exact ordering of the produced messages. 
- sorted : MessageOrderingSort the produced messages. 
Instances For
The specification options for #guard_msgs. The default field values provide the default
behavior of #guard_msgs.
- filterFn : Message → FilterSpecMethod for deciding whether and how to filter messages; see FilterSpec.
- whitespace : WhitespaceModeMethod to use when normalizing whitespace, after trimming; see WhitespaceMode.
- ordering : MessageOrderingMethod to use when combining multiple messages; see MessageOrdering.
- reportPositions : BoolWhether to report position information. 
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.GuardMsgs.parseGuardMsgsFilterAction action? = pure Lean.Elab.Tactic.GuardMsgs.FilterSpec.check
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parses a GuardMsgsSpec.
- No specification: check everything.
- With a specification: interpret the spec, and if nothing applies pass it through.
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.GuardMsgs.parseGuardMsgsSpec spec? = pure { }
Instances For
An info tree node corresponding to a failed #guard_msgs invocation,
used for code action support.
- res : StringThe result of the nested command 
Instances For
Makes trailing whitespace visible and protects them against trimming by the editor, by appending the symbol ⏎ to such a line (and also to any line that ends with such a symbol, to avoid ambiguities in the case the message already had that symbol).
Equations
- Lean.Elab.Tactic.GuardMsgs.revealTrailingWhitespace s = ((s.replace "⏎\n" "⏎⏎\n").replace "\t\n" "\t⏎\n").replace " \n" " ⏎\n"
Instances For
Equations
- Lean.Elab.Tactic.GuardMsgs.removeTrailingWhitespaceMarker s = s.replace "⏎\n" "\n"
Instances For
Applies a whitespace normalization mode.
Equations
- Lean.Elab.Tactic.GuardMsgs.WhitespaceMode.exact.apply s = s
- Lean.Elab.Tactic.GuardMsgs.WhitespaceMode.normalized.apply s = s.replace "\n" " "
- Lean.Elab.Tactic.GuardMsgs.WhitespaceMode.lax.apply s = " ".intercalate (List.filter (fun (x : String) => !x.isEmpty) (s.splitToList Char.isWhitespace))
Instances For
Applies a message ordering mode.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
A code action which will update the doc comment on a #guard_msgs invocation.
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.GuardMsgs.guardMsgsCodeAction x✝² x✝¹ x✝ node = pure #[]