projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bc9c551
)
FIX #1743, create a fresh unique for each Id we bind at a breakpoint
author
Simon Marlow
<simonmar@microsoft.com>
Tue, 9 Oct 2007 14:25:54 +0000
(14:25 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Tue, 9 Oct 2007 14:25:54 +0000
(14:25 +0000)
compiler/main/InteractiveEval.hs
patch
|
blob
|
history
diff --git
a/compiler/main/InteractiveEval.hs
b/compiler/main/InteractiveEval.hs
index
cdb6c94
..
9afedae
100644
(file)
--- a/
compiler/main/InteractiveEval.hs
+++ b/
compiler/main/InteractiveEval.hs
@@
-64,6
+64,7
@@
import ByteCodeInstr
import Linker
import DynFlags
import Unique
import Linker
import DynFlags
import Unique
+import UniqSupply
import Module
import Panic
import UniqFM
import Module
import Panic
import UniqFM
@@
-582,7
+583,13
@@
bindLocalsAtBreakpoint hsc_env apStack (Just info) = do
where
mkNewId :: OccName -> Id -> IO Id
mkNewId occ id = do
where
mkNewId :: OccName -> Id -> IO Id
mkNewId occ id = do
- let uniq = idUnique id
+ us <- mkSplitUniqSupply 'I'
+ -- we need a fresh Unique for each Id we bind, because the linker
+ -- state is single-threaded and otherwise we'd spam old bindings
+ -- whenever we stop at a breakpoint. The InteractveContext is properly
+ -- saved/restored, but not the linker state. See #1743, test break026.
+ let
+ uniq = uniqFromSupply us
loc = nameSrcSpan (idName id)
name = mkInternalName uniq occ loc
ty = idType id
loc = nameSrcSpan (idName id)
name = mkInternalName uniq occ loc
ty = idType id