WorkWrap: Explicit wantToUnbox* unboxing strategies
This is a refactoring that extracts a type synonym
type UnboxingStrategy s = Type -> s -> UnboxingDecision s
from GHC.Core.WorkWrap.Utils
, and gives two such strategies
in the form of wantToUnboxArg
and wantToUnboxResult
there.
This is all in order to underline the common bits in mkWWstr_one
and mkWWcpr
.
I've put UnboxingStrategy
into its own module GHC.Types.Unbox
,
because Nested CPR needs GHC.Types.Cpr
to depend on it.
I got rid of the direct DynFlags
dependency by introducing a WwOpts
record.