lean4-htt/tests/lean/run/specFixedHOParamModuloErased.lean
Cameron Zwarich 37cffbda51
fix: consider Prop-rebundled higher-order params to be fixed (#9198)
This PR changes the compiler's specialization analysis to consider
higher-order params that are rebundled in a way that only changes their
`Prop` arguments to be fixed. This means that they get specialized with
a mere `@[specialize]`, rather than the compiler having to opt-in to
more aggressive parameter-specific specialization.
2025-07-05 00:02:24 +00:00

10 lines
381 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.

/--
trace: [Compiler.specialize.info] pmap [true, true, false, true]
[Compiler.specialize.info] pmap [N, N, O, H]
-/
#guard_msgs in
set_option trace.Compiler.specialize.info true in
@[specialize]
def pmap : (l : List α) → (f : (a : α) → a ∈ l → β) → List β
| [], _ => []
| a :: l, f => f a List.mem_cons_self :: pmap l (fun a h => f a (List.mem_cons_of_mem _ h))