Fix a space leak in :trace (trac #2128)
[ghc-hetmet.git] / compiler / main / InteractiveEval.hs
index ace2a7f..40eb66a 100644 (file)
@@ -67,7 +67,7 @@ import Unique
 import UniqSupply
 import Module
 import Panic
-import UniqFM
+import LazyUniqFM
 import Maybes
 import ErrUtils
 import Util
@@ -360,7 +360,7 @@ rethrow dflags io = Exception.catch io $ \e -> do -- NB. not catchDyn
 withInterruptsSentTo :: ThreadId -> IO r -> IO r
 withInterruptsSentTo thread get_result = do
   bracket (modifyMVar_ interruptTargetThread (return . (thread:)))
-          (\_ -> modifyMVar_ interruptTargetThread (return.tail))
+          (\_ -> modifyMVar_ interruptTargetThread (\tl -> return $! tail tl))
           (\_ -> get_result)
 
 -- This function sets up the interpreter for catching breakpoints, and
@@ -610,7 +610,7 @@ rttiEnvironment hsc_env@HscEnv{hsc_IC=ic} = do
    tys <- reconstructType hsc_env 10 `mapM` incompletelyTypedIds
           -- map termType `fmap` (obtainTerm hsc_env False `mapM` incompletelyTypedIds)
    
-   let substs = [computeRTTIsubst ty ty' 
+   let substs = [unifyRTTI ty ty' 
                  | (ty, Just ty') <- zip (map idType incompletelyTypedIds) tys]
        ic'    = foldr (flip substInteractiveContext) ic 
                            (map skolemiseSubst substs)