summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt/WorkWrap.hs
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2021-03-26 11:54:25 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-28 00:12:21 -0400
commitb02c8ef768df33ef4845da2f15583cf143a4d0e2 (patch)
tree93cc9890baaf66d43818572e9d897687438a84c1 /compiler/GHC/Core/Opt/WorkWrap.hs
parentf6960b188f4e66bb1c7b00d55a015fdd418614a7 (diff)
downloadhaskell-b02c8ef768df33ef4845da2f15583cf143a4d0e2.tar.gz
Rename StrictSig to DmdSig (#19597)
In #19597, we also settled on the following renamings: * `idStrictness` -> `idDmdSig`, `strictnessInfo` -> `dmdSigInfo`, `HsStrictness` -> `HsDmdSig` * `idCprInfo` -> `idCprSig`, `cprInfo` -> `cprSigInfo`, `HsCpr` -> `HsCprSig` Fixes #19597.
Diffstat (limited to 'compiler/GHC/Core/Opt/WorkWrap.hs')
-rw-r--r--compiler/GHC/Core/Opt/WorkWrap.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/Core/Opt/WorkWrap.hs b/compiler/GHC/Core/Opt/WorkWrap.hs
index 030cb2ac8a..2ee334b9f8 100644
--- a/compiler/GHC/Core/Opt/WorkWrap.hs
+++ b/compiler/GHC/Core/Opt/WorkWrap.hs
@@ -511,9 +511,9 @@ tryWW dflags fam_envs is_rec fn_id rhs
where
uf_opts = unfoldingOpts dflags
fn_info = idInfo fn_id
- (wrap_dmds, div) = splitStrictSig (strictnessInfo fn_info)
+ (wrap_dmds, div) = splitDmdSig (dmdSigInfo fn_info)
- cpr_ty = getCprSig (cprInfo fn_info)
+ cpr_ty = getCprSig (cprSigInfo fn_info)
-- Arity of the CPR sig should match idArity when it's not a join point.
-- See Note [Arity trimming for CPR signatures] in GHC.Core.Opt.CprAnal
cpr = ASSERT2( isJoinId fn_id || cpr_ty == topCprType || ct_arty cpr_ty == arityInfo fn_info
@@ -584,7 +584,7 @@ divergence, it's also broken for newtypes:
where
co :: (Int -> Int -> Char) ~ T
-Then idArity is 2 (despite the type T), and it can have a StrictSig based on a
+Then idArity is 2 (despite the type T), and it can have a DmdSig based on a
threshold of 2. But we can't w/w it without a type error.
The situation is less grave for PAPs, but the implicit eta expansion caused a
@@ -679,11 +679,11 @@ mkWWBindPair dflags fn_id fn_info arity rhs work_uniq div cpr
`setIdUnfolding` mkWorkerUnfolding simpl_opts work_fn fn_unfolding
-- See Note [Worker-wrapper for INLINABLE functions]
- `setIdStrictness` mkClosedStrictSig work_demands div
+ `setIdDmdSig` mkClosedDmdSig work_demands div
-- Even though we may not be at top level,
-- it's ok to give it an empty DmdEnv
- `setIdCprInfo` mkCprSig work_arity work_cpr_info
+ `setIdCprSig` mkCprSig work_arity work_cpr_info
`setIdDemandInfo` worker_demand