Documentation

Lean.Compiler.NameDemangling

Name Demangling #

Human-friendly demangling of Lean compiler symbol names, extending Name.demangle with prefix handling, compiler suffix folding, and backtrace line parsing. Called from the C runtime via @[export] for backtrace display.

Reading demangled names #

The demangler transforms low-level C symbol names into readable Lean names and annotates them with compact modifiers.

Basic names #

Modifier flags #

Compiler-generated suffixes are folded into a bracket annotation after the name, indicating how the function was derived from the source definition:

Multiple flags are comma-separated: Lean.Meta.Simp.simpLambda [boxed, λ].

Specializations #

When the compiler specializes a function at a call site, the demangled name shows spec at <context> after the flags. The context may carry its own flags:

Other annotations #

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For