Skip to content

Private names are pretty-printed without considering open namespaces #10772

@Rob23oba

Description

@Rob23oba

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

Private names are always pretty-printed in full length. This is inconsistent with regular names, which take open namespaces into account.

Context

Verification of private functions via import all.

Steps to Reproduce

module
import all Init.Prelude

open Lean Name

/-- info: Lean.eraseMacroScopesAux✝ : Name → Name -/
#guard_msgs in #check (eraseMacroScopesAux)

/-- info: eraseMacroScopes : Name → Name -/
#guard_msgs in #check (eraseMacroScopes)

Expected behavior:
Neither of the name has the prefix Lean pretty-printed.

Actual behavior:
The private name includes the prefix Lean after pretty-printing.

Versions

Lean 4.25.0-nightly-2025-10-13

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-mediumWe may work on this issue if we find the timebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions