Skip to content

Fix void-arg-adding mechanism for worker/wrapper

Simon Peyton Jones requested to merge wip/T22725 into master

As #22725 (closed) shows, in worker/wrapper we must add the void argument last, not first. See GHC.Core.Opt.WorkWrap.Utils Note [Worker/wrapper needs to add void arg last].

That led me to to study GHC.Core.Opt.SpecConstr Note [SpecConstr needs to add void args first] which suggests the opposite! And indeed I think it's the other way round for SpecConstr -- or more precisely the void arg must precede the "extra_bndrs".

That led me to some refactoring of GHC.Core.Opt.SpecConstr.calcSpecInfo.

Merge request reports