lean4-htt/tests/lean/macroStack.lean.expected.out
jrr6 5f4e6a86d5
feat: update and explain "unknown constant" and "failed to infer type" errors (#9423)
This PR updates the formatting of, and adds explanations for, "unknown
identifier" errors as well as "failed to infer type" errors for binders
and definitions.

It attempts to ameliorate some of the confusion encountered in #1592 by
modifying the wording of the "header is elaborated before body is
processed" note and adding further discussion and examples of this
behavior in the corresponding error explanation.
2025-07-18 19:20:31 +00:00

27 lines
829 B
Text

macroStack.lean:4:5-4:6: error(lean.unknownIdentifier): Unknown identifier `x`
macroStack.lean:8:6-8:7: error: Unknown identifier `x`
with resulting expansion
binrel% GT.gt✝ x 0
while expanding
x > 0
while expanding
(x > 0)
while expanding
if h : (x > 0) then 1 else 0
macroStack.lean:11:9-11:15: error: invalid use of `(<- ...)`, must be nested inside a 'do' expression
macroStack.lean:17:0-17:6: error: failed to synthesize
HAdd Nat String ?m
Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.
with resulting expansion
binop% HAdd.hAdd✝ (x + x✝) x✝¹
while expanding
(x + x✝) + x✝¹
while expanding
foo!(x + x✝)
while expanding
foo!(x + x✝) < 1
while expanding
if foo!(x + x✝) < 1 then true✝ else false✝
while expanding
bla! x