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.
4 lines
360 B
Text
4 lines
360 B
Text
letrec1.lean:6:0-9:7: error: 'f1.g' has already been declared
|
|
letrec1.lean:18:35-18:36: error(lean.unknownIdentifier): Unknown identifier `g`
|
|
letrec1.lean:27:8-27:9: error: invalid type in 'let rec', it uses 'f' which is being defined simultaneously
|
|
letrec1.lean:37:10-37:11: error: invalid type in 'let rec', it uses 'g' which is being defined simultaneously
|