Substitute free variables captured by breakpoints in SpecConstr
Tracking ticket: #23267 (closed)
The variable substitution procedure in SpecConstr
ignored the free variables in Breakpoint
values, which caused them to refer to the Ids from the unspecialized expression.
The code I added is similar to what Specialise
is doing.
Most of the other modules in GHC/Core/Opt
put the Tickish
back unmodified, but I don't know if any of those would need similar treatment.
Work sponsored by Tweag