This PR adjusts the way the pretty printer unresolves names. It used to make use of all `export`s when pretty printing, but now it only uses `export`s that put names into parent namespaces (heuristic: these are "API exports" that are intended by the library author), rather than "horizontal exports" that put the names into an unrelated namespace, which the dot notation feature in #6189 now incentivizes. Closes the already closed #2524
17 lines
203 B
Text
17 lines
203 B
Text
/-!
|
|
# Pretty printing shouldn't make use of "non-API exports"
|
|
-/
|
|
|
|
namespace A
|
|
def n : Nat := 22
|
|
end A
|
|
|
|
namespace B
|
|
export A (n)
|
|
end B
|
|
|
|
/-!
|
|
Was `B.n`
|
|
-/
|
|
/-- info: A.n : Nat -/
|
|
#guard_msgs in #check (A.n)
|