diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-11-30 11:47:24 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2023-01-25 16:05:34 +0000 |
commit | f9f413bd526185e72807eb228a87edbaefffac84 (patch) | |
tree | 4f7509bea9f49075ec34107e002161092cd84d5c | |
parent | 0517eea94d3be1e409a8557785b8a65a18cc7979 (diff) | |
download | haskell-f9f413bd526185e72807eb228a87edbaefffac84.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
-rw-r--r-- | compiler/GHC/Iface/Tidy.hs | 3 |
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 |