lean4-htt/tests/lean/shadow.lean.expected.out
Sebastian Ullrich 51bba5338a
perf: make macro scope numbering less dependent on surrounding context (#10027)
This PR changes macro scope numbering from per-module to per-command,
ensuring that unrelated changes to other commands do not affect macro
scopes generated by a command, which improves `prefer_native` hit rates
on bootstrapping as well as avoids further rebuilds under the module
system.

In detail, instead of always using the current module name as a macro
scope prefix, each command now introduces a new macro scope prefix
(called "context") of the shape `<main module>._hygCtx_<uniq>` where
`uniq` is a `UInt32` derived from the command but automatically
incremented in case of conflicts (which must be local to the current
module). In the current implementation, `uniq` is the hash of the
declaration name, if any, or else the hash of the full command's syntax.
Thus, it is always independent of syntactic changes to other commands
(except in case of hash conflicts, which should only happen in practice
for syntactically identical commands) and, in the case of declarations,
also independent of syntactic changes to any private parts of the
declaration.
2025-08-22 13:16:02 +00:00

33 lines
826 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

shadow.lean:6:0-6:1: error: Type mismatch
h
has type
x✝ = x✝
but is expected to have type
x = x
shadow.lean:10:0-10:1: error: Type mismatch
h
has type
x = x
but is expected to have type
x = x
shadow.lean:13:0-13:1: error: don't know how to synthesize placeholder
context:
α : Type u_1
inst✝¹ : Inhabited α
inst✝ inst : α
⊢ {β δ : Type} → α → β → δ → α × β × δ
shadow.lean:17:0-17:1: error: don't know how to synthesize placeholder
context:
α : Type u_1
inst.3 : Inhabited α
inst inst : α
⊢ {β δ : Type} → α → β → δ → α × β × δ
shadow.lean:20:0-20:1: error: don't know how to synthesize placeholder
context:
α : Type u_1
β : Sort u_2
inst✝² : α
inst✝¹ b : β
inst : α
inst✝ : Inhabited α
⊢ {β δ : Type} → α → β → δ → α × β × δ