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:
88c6564
)
use extendInteractiveContext instead of custom code
author
Simon Marlow
<simonmar@microsoft.com>
Thu, 3 May 2007 13:15:25 +0000
(13:15 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Thu, 3 May 2007 13:15:25 +0000
(13:15 +0000)
compiler/ghci/Debugger.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/Debugger.hs
b/compiler/ghci/Debugger.hs
index
89d658d
..
44c37fb
100644
(file)
--- a/
compiler/ghci/Debugger.hs
+++ b/
compiler/ghci/Debugger.hs
@@
-127,7
+127,6
@@
bindSuspensions cms@(Session ref) t = do
hsc_env <- readIORef ref
inScope <- GHC.getBindings cms
let ictxt = hsc_IC hsc_env
hsc_env <- readIORef ref
inScope <- GHC.getBindings cms
let ictxt = hsc_IC hsc_env
- type_env = ic_tmp_ids ictxt
prefix = "_t"
alreadyUsedNames = map (occNameString . nameOccName . getName) inScope
availNames = map ((prefix++) . show) [1..] \\ alreadyUsedNames
prefix = "_t"
alreadyUsedNames = map (occNameString . nameOccName . getName) inScope
availNames = map ((prefix++) . show) [1..] \\ alreadyUsedNames
@@
-138,13
+137,11
@@
bindSuspensions cms@(Session ref) t = do
let ids = [ mkGlobalId VanillaGlobal name ty vanillaIdInfo
| (name,ty) <- zip names tys']
new_tyvars = tyVarsOfTypes tys'
let ids = [ mkGlobalId VanillaGlobal name ty vanillaIdInfo
| (name,ty) <- zip names tys']
new_tyvars = tyVarsOfTypes tys'
- old_tyvars = ic_tyvars ictxt
- new_ic = ictxt { ic_tmp_ids = ids ++ ic_tmp_ids ictxt,
- ic_tyvars = old_tyvars `unionVarSet` new_tyvars }
+ new_ic = extendInteractiveContext ictxt ids new_tyvars
extendLinkEnv (zip names hvals)
writeIORef ref (hsc_env {hsc_IC = new_ic })
return t'
extendLinkEnv (zip names hvals)
writeIORef ref (hsc_env {hsc_IC = new_ic })
return t'
- where
+ where
-- Processing suspensions. Give names and recopilate info
nameSuspensionsAndGetInfos :: IORef [String] -> TermFold (IO (Term, [(Name,Type,HValue)]))
-- Processing suspensions. Give names and recopilate info
nameSuspensionsAndGetInfos :: IORef [String] -> TermFold (IO (Term, [(Name,Type,HValue)]))