From cddf971c391fabb796675d0031422dc63884f25a Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 3 May 2007 13:15:25 +0000 Subject: [PATCH] use extendInteractiveContext instead of custom code --- compiler/ghci/Debugger.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs index 89d658d..44c37fb 100644 --- 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 - type_env = ic_tmp_ids ictxt 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' - 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' - where + where -- Processing suspensions. Give names and recopilate info nameSuspensionsAndGetInfos :: IORef [String] -> TermFold (IO (Term, [(Name,Type,HValue)])) -- 1.7.10.4