lean4-htt/tests/lean/run/5689.lean
Kyle Miller cd909b0a98
fix: when pretty printing constant names, do not use aliases from "non-API exports" (#5689)
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
2024-12-10 17:50:50 +00:00

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)