summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Tidy.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core/Tidy.hs')
-rw-r--r--compiler/GHC/Core/Tidy.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/GHC/Core/Tidy.hs b/compiler/GHC/Core/Tidy.hs
index 2a4c538ab1..5326346ead 100644
--- a/compiler/GHC/Core/Tidy.hs
+++ b/compiler/GHC/Core/Tidy.hs
@@ -375,15 +375,16 @@ tidyNestedUnfolding tidy_env df@(DFunUnfolding { df_bndrs = bndrs, df_args = arg
(tidy_env', bndrs') = tidyBndrs tidy_env bndrs
tidyNestedUnfolding tidy_env
- unf@(CoreUnfolding { uf_tmpl = unf_rhs, uf_src = src, uf_is_value = is_value })
+ unf@(CoreUnfolding { uf_tmpl = unf_rhs, uf_src = src, uf_cache = cache })
| isStableSource src
= seqIt $ unf { uf_tmpl = tidyExpr tidy_env unf_rhs } -- Preserves OccInfo
- -- This seqIt avoids a space leak: otherwise the uf_is_value,
- -- uf_is_conlike, ... fields may retain a reference to the
- -- pre-tidied expression forever (GHC.CoreToIface doesn't look at them)
+ -- This seqIt avoids a space leak: otherwise the uf_cache
+ -- field may retain a reference to the pre-tidied
+ -- expression forever (GHC.CoreToIface doesn't look at
+ -- them)
-- Discard unstable unfoldings, but see Note [Preserve evaluatedness]
- | is_value = evaldUnfolding
+ | uf_is_value cache = evaldUnfolding
| otherwise = noUnfolding
where