summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface/Ext/Binary.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-01-14 23:17:16 -0500
committerBen Gamari <ben@smart-cactus.org>2021-01-15 14:08:15 -0500
commit4ec9dd9d0cdb4b854b61657d803319758bea2670 (patch)
tree5aee87f40ad7411299930d7abb1b4be3d8797b0c /compiler/GHC/Iface/Ext/Binary.hs
parent88fa0bcaa3da78fece7f521229e5ae99fd834832 (diff)
downloadhaskell-wip/T19214.tar.gz
Consolidate NameCache extension logicwip/T19214
Diffstat (limited to 'compiler/GHC/Iface/Ext/Binary.hs')
-rw-r--r--compiler/GHC/Iface/Ext/Binary.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/GHC/Iface/Ext/Binary.hs b/compiler/GHC/Iface/Ext/Binary.hs
index 69aee26586..ef35e4efe5 100644
--- a/compiler/GHC/Iface/Ext/Binary.hs
+++ b/compiler/GHC/Iface/Ext/Binary.hs
@@ -319,11 +319,7 @@ fromHieName nc (ExternalName mod occ span) =
let cache = nsNames nc
in case lookupOrigNameCache cache mod occ of
Just name -> (nc, name)
- Nothing ->
- let (uniq, us) = takeUniqFromSupply (nsUniqs nc)
- name = mkExternalName uniq mod occ span
- new_cache = extendNameCache cache mod occ name
- in ( nc{ nsUniqs = us, nsNames = new_cache }, name )
+ Nothing -> allocNameInCache mod occ span nc
fromHieName nc (LocalName occ span) =
let (uniq, us) = takeUniqFromSupply (nsUniqs nc)
name = mkInternalName uniq occ span