lean4-htt/tests/compiler/expr.lean
Rob23oba fad0e69cc7
fix: make name mangling unambiguous (#10727)
This PR fixes name mangling to be unambiguous / injective by adding `00`
for disambiguation where necessary. Additionally, the inverse function,
`Lean.Name.unmangle` has been added which can be used to unmangle a
mangled identifier. This unmangler has been added to demonstrate the
injectivity but also to allow unmangling identifiers e.g. for debugging
purposes.

Closes #10724
2025-10-23 07:18:07 +00:00

12 lines
252 B
Text

import Lean
def main : IO Unit := pure () /- -- TODO: remove after stage0 update
open Lean
def main : IO UInt32 := do
let e := mkAppN (mkConst `f) #[mkConst `a, mkConst `b]
IO.println e
IO.println s!"hash: {e.hash}"
IO.println e.getAppArgs
pure 0
-/