summaryrefslogtreecommitdiff
path: root/compiler/specialise/SpecConstr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/specialise/SpecConstr.hs')
-rw-r--r--compiler/specialise/SpecConstr.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs
index 6a6900123d..d426b3fe21 100644
--- a/compiler/specialise/SpecConstr.hs
+++ b/compiler/specialise/SpecConstr.hs
@@ -48,6 +48,7 @@ import DynFlags ( DynFlags(..), GeneralFlag( Opt_SpecConstrKeen )
, gopt, hasPprDebug )
import Maybes ( orElse, catMaybes, isJust, isNothing )
import Demand
+import Cpr
import GHC.Serialized ( deserializeWithData )
import Util
import Pair
@@ -1726,6 +1727,7 @@ spec_one env fn arg_bndrs body (call_pat@(qvars, pats), rule_number)
(mkLamTypes spec_lam_args body_ty)
-- See Note [Transfer strictness]
`setIdStrictness` spec_str
+ `setIdCprInfo` topCprSig
`setIdArity` count isId spec_lam_args
`asJoinId_maybe` spec_join_arity
spec_str = calcSpecStrictness fn spec_lam_args pats
@@ -1759,7 +1761,7 @@ calcSpecStrictness :: Id -- The original function
-> StrictSig -- Strictness of specialised thing
-- See Note [Transfer strictness]
calcSpecStrictness fn qvars pats
- = mkClosedStrictSig spec_dmds topRes
+ = mkClosedStrictSig spec_dmds topDiv
where
spec_dmds = [ lookupVarEnv dmd_env qv `orElse` topDmd | qv <- qvars, isId qv ]
StrictSig (DmdType _ dmds _) = idStrictness fn