feat: add Lean name demangling to runtime backtraces This PR adds human-friendly demangling of Lean symbol names in runtime backtraces. When a Lean program panics, stack traces now show readable names instead of mangled C identifiers. Before: `l_Lean_Meta_Grind_unfoldReducible___redArg___lam__0___boxed` After: `Lean.Meta.Grind.unfoldReducible [boxed, λ, arity↓]` The demangler is a C++ port of `Name.demangleAux` from NameMangling.lean with human-friendly postprocessing: - suffix folding: `_redArg` → `[arity↓]`, `_boxed` → `[boxed]`, `_lam_N` → `[λ]` - private name cleanup: `_private.Module.0.Name.foo` → `Name.foo [private]` - specialization context: `_at_`/`_spec` → `spec at ...` - hygienic suffix stripping - `lean_apply_N` → `<apply/N>` Set `LEAN_BACKTRACE_RAW=1` to disable demangling and get raw symbol names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This is the repository for Lean 4.
See Install Lean.
Please read our Contribution Guidelines first.
See Building Lean.