File: .lake/packages/lean4/src/lean/Lean/Elab/GuardMsgs.lean

full_name: initFn._@..lake.packages.lean4.src.lean.Lean.Elab.GuardMsgs._hyg.7
code: register_builtin_option guard_msgs.diff : Bool := {
  defValue := false
  descr := "When true, show a diff between expected and actual messages if they don't match. "
}
goal: IO (Lean.Option Bool)

full_name: guard_msgs.diff
code: register_builtin_option guard_msgs.diff : Bool := {
  defValue := false
  descr := "When true, show a diff between expected and actual messages if they don't match. "
}
goal: Lean.Option Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.GuardMsgs.0.Lean.Elab.Tactic.GuardMsgs.messageToStringWithoutPos
code: /-- Gives a string representation of a message without source position information.
Ensures the message ends with a '\n'. -/
private def messageToStringWithoutPos (msg : Message) : IO String 
goal: IO String

full_name: Lean.Elab.Tactic.GuardMsgs.SpecResult.drop
code: /-- The decision made by a specification for a message. -/
inductive SpecResult
  /-- Capture the message and check it matches the docstring. -/
  | check
  /-- Drop the message and delete it. -/
  | drop
  /-- Do not capture the message. -/
  | passthrough
goal: Lean.Elab.Tactic.GuardMsgs.SpecResult

full_name: Lean.Elab.Tactic.GuardMsgs.SpecResult.passthrough
code: /-- The decision made by a specification for a message. -/
inductive SpecResult
  /-- Capture the message and check it matches the docstring. -/
  | check
  /-- Drop the message and delete it. -/
  | drop
  /-- Do not capture the message. -/
  | passthrough
goal: Lean.Elab.Tactic.GuardMsgs.SpecResult

full_name: Lean.Elab.Tactic.GuardMsgs.SpecResult.check
code: /-- The decision made by a specification for a message. -/
inductive SpecResult
  /-- Capture the message and check it matches the docstring. -/
  | check
  /-- Drop the message and delete it. -/
  | drop
  /-- Do not capture the message. -/
  | passthrough
goal: Lean.Elab.Tactic.GuardMsgs.SpecResult

full_name: Lean.Elab.Tactic.GuardMsgs.SpecResult
code: /-- The decision made by a specification for a message. -/
inductive SpecResult
  /-- Capture the message and check it matches the docstring. -/
  | check
  /-- Drop the message and delete it. -/
  | drop
  /-- Do not capture the message. -/
  | passthrough
goal: Type

full_name: Lean.Elab.Tactic.GuardMsgs.WhitespaceMode.normalized
code: /-- The method to use when normalizing whitespace, after trimming. -/
inductive WhitespaceMode
  /-- Exact equality. -/
  | exact
  /-- Equality after normalizing newlines into spaces. -/
  | normalized
  /-- Equality after collapsing whitespace into single spaces. -/
  | lax
goal: Lean.Elab.Tactic.GuardMsgs.WhitespaceMode

full_name: Lean.Elab.Tactic.GuardMsgs.WhitespaceMode.lax
code: /-- The method to use when normalizing whitespace, after trimming. -/
inductive WhitespaceMode
  /-- Exact equality. -/
  | exact
  /-- Equality after normalizing newlines into spaces. -/
  | normalized
  /-- Equality after collapsing whitespace into single spaces. -/
  | lax
goal: Lean.Elab.Tactic.GuardMsgs.WhitespaceMode

full_name: Lean.Elab.Tactic.GuardMsgs.WhitespaceMode.exact
code: /-- The method to use when normalizing whitespace, after trimming. -/
inductive WhitespaceMode
  /-- Exact equality. -/
  | exact
  /-- Equality after normalizing newlines into spaces. -/
  | normalized
  /-- Equality after collapsing whitespace into single spaces. -/
  | lax
goal: Lean.Elab.Tactic.GuardMsgs.WhitespaceMode

full_name: Lean.Elab.Tactic.GuardMsgs.WhitespaceMode
code: /-- The method to use when normalizing whitespace, after trimming. -/
inductive WhitespaceMode
  /-- Exact equality. -/
  | exact
  /-- Equality after normalizing newlines into spaces. -/
  | normalized
  /-- Equality after collapsing whitespace into single spaces. -/
  | lax
goal: Type

full_name: Lean.Elab.Tactic.GuardMsgs.MessageOrdering.exact
code: /-- Method to use when combining multiple messages. -/
inductive MessageOrdering
  /-- Use the exact ordering of the produced messages. -/
  | exact
  /-- Sort the produced messages. -/
  | sorted
goal: Lean.Elab.Tactic.GuardMsgs.MessageOrdering

full_name: Lean.Elab.Tactic.GuardMsgs.MessageOrdering
code: /-- Method to use when combining multiple messages. -/
inductive MessageOrdering
  /-- Use the exact ordering of the produced messages. -/
  | exact
  /-- Sort the produced messages. -/
  | sorted
goal: Type

full_name: Lean.Elab.Tactic.GuardMsgs.MessageOrdering.sorted
code: /-- Method to use when combining multiple messages. -/
inductive MessageOrdering
  /-- Use the exact ordering of the produced messages. -/
  | exact
  /-- Sort the produced messages. -/
  | sorted
goal: Lean.Elab.Tactic.GuardMsgs.MessageOrdering

full_name: Lean.Elab.Tactic.GuardMsgs.parseGuardMsgsSpec
code: /-- Parses a `guardMsgsSpec`.
- No specification: check everything.
- With a specification: interpret the spec, and if nothing applies pass it through. -/
def parseGuardMsgsSpec (spec? : Option (TSyntax ``guardMsgsSpec)) :
    CommandElabM (WhitespaceMode × MessageOrdering × (Message → SpecResult)) 
goal: Lean.Elab.Command.CommandElabM
  (Lean.Elab.Tactic.GuardMsgs.WhitespaceMode ×
    Lean.Elab.Tactic.GuardMsgs.MessageOrdering × (Lean.Message → Lean.Elab.Tactic.GuardMsgs.SpecResult))

full_name: Lean.Elab.Tactic.GuardMsgs.GuardMsgFailure.res
code: /-- An info tree node corresponding to a failed `#guard_msgs` invocation,
used for code action support. -/
structure GuardMsgFailure where
  /-- The result of the nested command -/
  res : String
deriving TypeName
goal: String

full_name: Lean.Elab.Tactic.GuardMsgs.GuardMsgFailure
code: /-- An info tree node corresponding to a failed `#guard_msgs` invocation,
used for code action support. -/
structure GuardMsgFailure where
  /-- The result of the nested command -/
  res : String
deriving TypeName
goal: Type

full_name: Lean.Elab.Tactic.GuardMsgs.inst._@..lake.packages.lean4.src.lean.Lean.Elab.GuardMsgs._hyg.1823
code: TypeName
goal: TypeName Lean.Elab.Tactic.GuardMsgs.GuardMsgFailure

full_name: Lean.Elab.Tactic.GuardMsgs.instTypeNameGuardMsgFailure
code: TypeName
goal: TypeName Lean.Elab.Tactic.GuardMsgs.GuardMsgFailure

full_name: Lean.Elab.Tactic.GuardMsgs.instImpl._@..lake.packages.lean4.src.lean.Lean.Elab.GuardMsgs._hyg.1823
code: TypeName
goal: TypeName Lean.Elab.Tactic.GuardMsgs.GuardMsgFailure

full_name: Lean.Elab.Tactic.GuardMsgs.revealTrailingWhitespace
code: /--
Makes trailing whitespace visible and protectes 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).
-/
def revealTrailingWhitespace (s : String) : String 
goal: String

full_name: Lean.Elab.Tactic.GuardMsgs.removeTrailingWhitespaceMarker
code: def removeTrailingWhitespaceMarker (s : String) : String 
goal: String

full_name: Lean.Elab.Tactic.GuardMsgs.WhitespaceMode.apply
code: /--
Applies a whitespace normalization mode.
-/
def WhitespaceMode.apply (mode : WhitespaceMode) (s : String) : String 
goal: String

full_name: Lean.Elab.Tactic.GuardMsgs.MessageOrdering.apply
code: /--
Applies a message ordering mode.
-/
def MessageOrdering.apply (mode : MessageOrdering) (msgs : List String) : List String 
goal: List String

full_name: Lean.Elab.Tactic.GuardMsgs.elabGuardMsgs
code: @[builtin_command_elab Lean.guardMsgsCmd] def elabGuardMsgs : CommandElab
  
goal: Lean.Elab.Command.CommandElab

full_name: Lean.Elab.Tactic.GuardMsgs.guardMsgsCodeAction
code: /-- A code action which will update the doc comment on a `#guard_msgs` invocation. -/
@[builtin_command_code_action guardMsgsCmd]
def guardMsgsCodeAction : CommandCodeAction 
goal: Lean.CodeAction.CommandCodeAction