summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-11-30 11:47:24 +0000
committerZubin Duggal <zubin.duggal@gmail.com>2022-12-05 11:01:07 +0530
commit301622ea98151c378ce129cba605cc7ffa1ecfd9 (patch)
tree2e4ac6a03947e9e020b6becec1f55026e87ddd9c
parent68e9954cc618c80b030b75e58cd1d98b52e70c79 (diff)
downloadhaskell-301622ea98151c378ce129cba605cc7ffa1ecfd9.tar.gz
Force OccName in tidyTopName
(cherry picked from commit 0c5959ffc07f41fe2b7ac9fa7171e9f6901477f2)
-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 4032bfbc4d..5d80fa7f0c 100644
--- a/compiler/GHC/Iface/Tidy.hs
+++ b/compiler/GHC/Iface/Tidy.hs
@@ -1073,7 +1073,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