lean4-htt/tests/lean/binopInfoTree.lean.expected.out
Kyle Miller b56ad5a7d2
fix: apply newlines before and after comments when formatting syntax (#8626)
This PR closes #3791, making sure that the Syntax formatter inserts
whitespace before and after comments in the leading and trailing text of
Syntax to avoid having comments comment out any following syntax, and to
avoid comments' lexical syntax from being interpreted as being part of
another syntax. If the text contains newlines before or after any
comments, they are formatted as hard newlines rather than soft newlines.
For example, `--` comments will have a hard newline after them. Note:
metaprograms generating Syntax with comments should be sure to include
newlines at the ends of `--` comments.
2025-06-26 19:23:35 +00:00

82 lines
5 KiB
Text

[Elab.info]
• [Command] @ ⟨3, 0⟩-⟨3, 31⟩ @ Lean.Elab.Command.elabSetOption
• [Completion] (Command.set_option "set_option" `trace.Elab.info []) @ ⟨3, 0⟩-⟨3, 26⟩
• [Option] trace.Elab.info @ ⟨3, 11⟩-⟨3, 26⟩
1 + 2 + 3 : Nat
[Elab.info]
• [Command] @ ⟨5, 0⟩-⟨5, 16⟩ @ Lean.Elab.Command.elabCheck
• [Term] 1 + 2 + 3 : Nat @ ⟨5, 7⟩-⟨5, 16⟩ @ «_aux_Init_Notation___macroRules_term_+__2»
• [MacroExpansion]
1 + 2 +
3
-- should propagate through multiple macro expansions
===>
binop% HAdd.hAdd✝ (1 + 2)
3
-- should propagate through multiple macro expansions
• [Term] 1 + 2 + 3 : Nat @ ⟨5, 7⟩†-⟨5, 16⟩† @ Lean.Elab.Term.Op.elabBinOp
• [Term] 1 + 2 + 3 : Nat @ ⟨5, 7⟩†-⟨5, 16⟩†
• [Term] 1 + 2 : Nat @ ⟨5, 7⟩-⟨5, 12⟩ @ «_aux_Init_Notation___macroRules_term_+__2»
• [MacroExpansion]
1 + 2
===>
binop% HAdd.hAdd✝ 1 2
• [Term] 1 + 2 : Nat @ ⟨5, 7⟩†-⟨5, 12⟩†
• [Completion-Id] HAdd.hAdd✝ : none @ ⟨5, 7⟩†-⟨5, 16⟩†
• [Completion-Id] HAdd.hAdd✝ : none @ ⟨5, 7⟩†-⟨5, 12⟩†
• [Term] 1 : Nat @ ⟨5, 7⟩-⟨5, 8⟩ @ Lean.Elab.Term.elabNumLit
• [Term] 2 : Nat @ ⟨5, 11⟩-⟨5, 12⟩ @ Lean.Elab.Term.elabNumLit
• [Term] 3 : Nat @ ⟨5, 15⟩-⟨5, 16⟩ @ Lean.Elab.Term.elabNumLit
fun n m l => ↑n + (↑m + ↑l) : Nat → Nat → Nat → Int
[Elab.info]
• [Command] @ ⟨7, 0⟩-⟨7, 48⟩ @ Lean.Elab.Command.elabCheck
• [Term] fun n m l => ↑n + (↑m + ↑l) : Nat → Nat → Nat → Int @ ⟨7, 7⟩-⟨7, 48⟩ @ Lean.Elab.Term.elabFun
• [Term] Nat : Type @ ⟨7, 20⟩-⟨7, 23⟩ @ Lean.Elab.Term.elabIdent
• [Completion-Id] Nat : some Sort.{?_uniq} @ ⟨7, 20⟩-⟨7, 23⟩
• [Term] Nat : Type @ ⟨7, 20⟩-⟨7, 23⟩
• [Term] n (isBinder := true) : Nat @ ⟨7, 12⟩-⟨7, 13⟩
• [Term] Nat : Type @ ⟨7, 20⟩-⟨7, 23⟩ @ Lean.Elab.Term.elabIdent
• [Completion-Id] Nat : some Sort.{?_uniq} @ ⟨7, 20⟩-⟨7, 23⟩
• [Term] Nat : Type @ ⟨7, 20⟩-⟨7, 23⟩
• [Term] m (isBinder := true) : Nat @ ⟨7, 14⟩-⟨7, 15⟩
• [Term] Nat : Type @ ⟨7, 20⟩-⟨7, 23⟩ @ Lean.Elab.Term.elabIdent
• [Completion-Id] Nat : some Sort.{?_uniq} @ ⟨7, 20⟩-⟨7, 23⟩
• [Term] Nat : Type @ ⟨7, 20⟩-⟨7, 23⟩
• [Term] l (isBinder := true) : Nat @ ⟨7, 16⟩-⟨7, 17⟩
• [Term] ↑n + (↑m + ↑l) : Int @ ⟨7, 28⟩-⟨7, 48⟩ @ Lean.Elab.Term.elabTypeAscription
• [Term] Int : Type @ ⟨7, 44⟩-⟨7, 47⟩ @ Lean.Elab.Term.elabIdent
• [Completion-Id] Int : some Sort.{?_uniq} @ ⟨7, 44⟩-⟨7, 47⟩
• [Term] Int : Type @ ⟨7, 44⟩-⟨7, 47⟩
• [Term] ↑n + (↑m + ↑l) : Int @ ⟨7, 29⟩-⟨7, 41⟩ @ «_aux_Init_Notation___macroRules_term_+__2»
• [MacroExpansion]
n + (m +' l)
===>
binop% HAdd.hAdd✝ n (m +' l)
• [Term] ↑n + (↑m + ↑l) : Int @ ⟨7, 29⟩†-⟨7, 41⟩† @ Lean.Elab.Term.Op.elabBinOp
• [Term] ↑n + (↑m + ↑l) : Int @ ⟨7, 29⟩†-⟨7, 41⟩†
• [Completion-Id] HAdd.hAdd✝ : none @ ⟨7, 29⟩†-⟨7, 41⟩†
• [Term] n : Nat @ ⟨7, 29⟩-⟨7, 30⟩ @ Lean.Elab.Term.elabIdent
• [Completion-Id] n : none @ ⟨7, 29⟩-⟨7, 30⟩
• [Term] n : Nat @ ⟨7, 29⟩-⟨7, 30⟩
• [Term] ↑m + ↑l : Int @ ⟨7, 34⟩-⟨7, 40⟩ @ «_aux_binopInfoTree___macroRules_term_+'__1»
• [MacroExpansion]
m +' l
===>
m + l
• [Term] ↑m + ↑l : Int @ ⟨7, 34⟩†-⟨7, 40⟩† @ «_aux_Init_Notation___macroRules_term_+__2»
• [MacroExpansion]
m + l
===>
binop% HAdd.hAdd✝ m l
• [Term] ↑m + ↑l : Int @ ⟨7, 34⟩†-⟨7, 40⟩†
• [Completion-Id] HAdd.hAdd✝ : none @ ⟨7, 34⟩†-⟨7, 40⟩†
• [Term] m : Nat @ ⟨7, 34⟩-⟨7, 35⟩ @ Lean.Elab.Term.elabIdent
• [Completion-Id] m : none @ ⟨7, 34⟩-⟨7, 35⟩
• [Term] m : Nat @ ⟨7, 34⟩-⟨7, 35⟩
• [Term] l : Nat @ ⟨7, 39⟩-⟨7, 40⟩ @ Lean.Elab.Term.elabIdent
• [Completion-Id] l : none @ ⟨7, 39⟩-⟨7, 40⟩
• [Term] l : Nat @ ⟨7, 39⟩-⟨7, 40⟩
[Elab.info]
• [Command] @ ⟨8, 0⟩-⟨8, 0⟩ @ Lean.Elab.Command.elabEoi