X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fiface%2FBinIface.hs;fp=compiler%2Fiface%2FBinIface.hs;h=f7a9aa297a86356459f1a856283ff5b1f663cc30;hp=211e8a7cf4e5b52e96d60d10ea8a12d189f8b980;hb=14a496fd0b3aa821b69eb02736d5f41086576761;hpb=00a05a5c09b097e3afa8d21058a3a4d8ed410ad4 diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs index 211e8a7..f7a9aa2 100644 --- a/compiler/iface/BinIface.hs +++ b/compiler/iface/BinIface.hs @@ -263,15 +263,13 @@ fromOnDiskName _ nc (pid, mod_name, occ) = case lookupOrigNameCache cache mod occ of Just name -> (nc, name) Nothing -> - let - us = nsUniqs nc - uniq = uniqFromSupply us + case takeUniqFromSupply (nsUniqs nc) of + (uniq, us) -> + let name = mkExternalName uniq mod occ noSrcSpan new_cache = extendNameCache cache mod occ name - in - case splitUniqSupply us of { (us',_) -> - ( nc{ nsUniqs = us', nsNames = new_cache }, name ) - } + in + ( nc{ nsUniqs = us, nsNames = new_cache }, name ) serialiseName :: BinHandle -> Name -> UniqFM (Int,Name) -> IO () serialiseName bh name _ = do