projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch more uniqFromSupply+splitUniqSupply's to takeUniqFromSupply
[ghc-hetmet.git]
/
compiler
/
iface
/
BinIface.hs
diff --git
a/compiler/iface/BinIface.hs
b/compiler/iface/BinIface.hs
index
211e8a7
..
f7a9aa2
100644
(file)
--- 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 ->
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
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
serialiseName :: BinHandle -> Name -> UniqFM (Int,Name) -> IO ()
serialiseName bh name _ = do