summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-11-30 11:47:24 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-26 12:34:56 -0500
commit3d004d5a961fbbbe11da1050b725468a970bee4b (patch)
tree8186aac7a6240750bea8623db2464bdea1fe6262 /compiler/GHC
parente27eb80cc7e0c82e07fbd8d9ae8112d9070c4355 (diff)
downloadhaskell-3d004d5a961fbbbe11da1050b725468a970bee4b.tar.gz
Force OccName in tidyTopName
This occname has just been derived from an `Id`, so need to force it promptly so we can release the Id back to the world. Another symptom of the bug caused by #19619
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Iface/Tidy.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Iface/Tidy.hs b/compiler/GHC/Iface/Tidy.hs
index 327bb28412..135a0b9ad4 100644
--- a/compiler/GHC/Iface/Tidy.hs
+++ b/compiler/GHC/Iface/Tidy.hs
@@ -1077,7 +1077,8 @@ tidyTopName mod name_cache maybe_ref occ_env id
-- we have to update the name cache in a nice atomic fashion
| local && internal = do uniq <- takeUniqFromNameCache name_cache
- let new_local_name = mkInternalName uniq occ' loc
+ -- See #19619
+ let new_local_name = occ' `seq` mkInternalName uniq occ' loc
return (occ_env', new_local_name)
-- Even local, internal names must get a unique occurrence, because
-- if we do -split-objs we externalise the name later, in the code generator