X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FDebugger.hs;h=504dc1dfbd7b54995d5a81aff4b0dcaaaae9ddd9;hb=f871cf1bf889704a4ec1f0063ad4d96f31453ea3;hp=712eec05aaed12915630850e2633b485cbe86dfd;hpb=decbb181cf7a06c6135ca451307a7e7214385f2e;p=ghc-hetmet.git diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs index 712eec0..504dc1d 100644 --- a/compiler/ghci/Debugger.hs +++ b/compiler/ghci/Debugger.hs @@ -16,23 +16,22 @@ import Linker import RtClosureInspect import HscTypes -import IdInfo import Id import Name import Var hiding ( varName ) import VarSet -import Name +-- import Name import UniqSupply import TcType import GHC -import DynFlags +-- import DynFlags import InteractiveEval import Outputable -import SrcLoc +-- import SrcLoc import PprTyThing import MonadUtils -import Exception +-- import Exception import Control.Monad import Data.List import Data.Maybe @@ -117,7 +116,7 @@ bindSuspensions t = do (t', stuff) <- liftIO $ foldTerm (nameSuspensionsAndGetInfos availNames_var) t let (names, tys, hvals) = unzip3 stuff (tys', skol_vars) = unzip $ map skolemiseTy tys - let ids = [ mkGlobalId VanillaGlobal name ty vanillaIdInfo + let ids = [ mkVanillaGlobal name ty | (name,ty) <- zip names tys'] new_ic = extendInteractiveContext ictxt ids (unionVarSets skol_vars) liftIO $ extendLinkEnv (zip names hvals) @@ -172,7 +171,7 @@ showTerm term = do -- with the changed error handling and logging? let noop_log _ _ _ _ = return () expr = "show " ++ showSDoc (ppr bname) - GHC.setSessionDynFlags dflags{log_action=noop_log} + _ <- GHC.setSessionDynFlags dflags{log_action=noop_log} txt_ <- withExtendedLinkEnv [(bname, val)] (GHC.compileExpr expr) let myprec = 10 -- application precedence. TODO Infix constructors @@ -199,7 +198,7 @@ showTerm term = do name <- newGrimName userName let ictxt = hsc_IC hsc_env tmp_ids = ic_tmp_ids ictxt - id = mkGlobalId VanillaGlobal name ty vanillaIdInfo + id = mkVanillaGlobal name ty new_ic = ictxt { ic_tmp_ids = id : tmp_ids } return (hsc_env {hsc_IC = new_ic }, name)