diff options
author | Ian Lynagh <igloo@earth.li> | 2010-10-21 14:28:24 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-10-21 14:28:24 +0000 |
commit | 14a496fd0b3aa821b69eb02736d5f41086576761 (patch) | |
tree | ea4fd69e6840f9070dbc429e5dd6b28f17e52b80 /compiler/iface | |
parent | 00a05a5c09b097e3afa8d21058a3a4d8ed410ad4 (diff) | |
download | haskell-14a496fd0b3aa821b69eb02736d5f41086576761.tar.gz |
Switch more uniqFromSupply+splitUniqSupply's to takeUniqFromSupply
Diffstat (limited to 'compiler/iface')
-rw-r--r-- | compiler/iface/BinIface.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs index 211e8a7cf4..f7a9aa297a 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 |