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.
16 lines
333 B
Text
16 lines
333 B
Text
module
|
|
|
|
import Module.Basic
|
|
|
|
/-! `private import` should allow only private access to imported decls. -/
|
|
|
|
public def g := f
|
|
|
|
/-- error: Unknown identifier `f` -/
|
|
#guard_msgs in
|
|
set_option autoImplicit false in
|
|
public theorem t2 : f = 1 := sorry
|
|
|
|
/-- error: Unknown identifier `f` -/
|
|
#guard_msgs in
|
|
@[expose] public def h : True := f
|