diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-01-09 15:50:12 +0000 |
---|---|---|
committer | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-01-11 08:28:34 +0000 |
commit | 3e329cf4240822fad79cb2d1931c831e799010fd (patch) | |
tree | bf59c726109c788e9ed756b261544ab459b8fd18 /compiler/GHC/Core/Utils.hs | |
parent | 083f701553852c4460159cd6deb2515d3373714d (diff) | |
download | haskell-3e329cf4240822fad79cb2d1931c831e799010fd.tar.gz |
Fix void-arg-adding mechanism for worker/wrapperwip/T22725
As #22725 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.
Diffstat (limited to 'compiler/GHC/Core/Utils.hs')
-rw-r--r-- | compiler/GHC/Core/Utils.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs index 32be6488b8..a0d3bc9c44 100644 --- a/compiler/GHC/Core/Utils.hs +++ b/compiler/GHC/Core/Utils.hs @@ -158,7 +158,7 @@ coreAltsType :: [CoreAlt] -> Type coreAltsType (alt:_) = coreAltType alt coreAltsType [] = panic "coreAltsType" -mkLamType :: Var -> Type -> Type +mkLamType :: HasDebugCallStack => Var -> Type -> Type -- ^ Makes a @(->)@ type or an implicit forall type, depending -- on whether it is given a type variable or a term variable. -- This is used, for example, when producing the type of a lambda. |