X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fmain%2FGHC.hs;h=a850650e70160da09454ecc6e779d79480f473fe;hb=3d0ad8a75e9874e222e2e149b8914e2ed74af7b8;hp=35e4d9db1c4ddde6593c424db3c554e0d4797224;hpb=86bec4298d582ef1d8f0a201d6a81145e1be9498;p=ghc-hetmet.git diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 35e4d9d..a850650 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -15,7 +15,7 @@ module GHC ( -- * Flags and settings DynFlags(..), DynFlag(..), Severity(..), HscTarget(..), dopt, - GhcMode(..), GhcLink(..), + GhcMode(..), GhcLink(..), defaultObjectTarget, parseDynamicFlags, getSessionDynFlags, setSessionDynFlags, @@ -78,11 +78,15 @@ module GHC ( typeKind, parseName, RunResult(..), - runStmt, stepStmt, -- traceStmt, - resume, stepResume, -- traceResume, - Resume(resumeStmt, resumeThreadId, resumeBreakInfo, resumeSpan), + runStmt, SingleStep(..), + resume, + Resume(resumeStmt, resumeThreadId, resumeBreakInfo, resumeSpan, + resumeHistory, resumeHistoryIx), + History(historyBreakInfo), getHistorySpan, getResumeContext, abandon, abandonAll, + InteractiveEval.back, + InteractiveEval.forward, showModule, isModuleInterpreted, compileExpr, HValue, dynCompileExpr, @@ -231,6 +235,8 @@ import SysTools ( initSysTools, cleanTempFiles, cleanTempFilesExcept, cleanTempDirs ) import Module import UniqFM +import UniqSet +import Unique import PackageConfig import FiniteMap import Panic @@ -1748,10 +1754,14 @@ getBindings s = withSession s $ \hsc_env -> -- we have to implement the shadowing behaviour of ic_tmp_ids here -- (see InteractiveContext) and the quickest way is to use an OccEnv. let - tmp_ids = reverse (ic_tmp_ids (hsc_IC hsc_env)) - env = mkOccEnv [ (nameOccName (idName id), id) | id <- tmp_ids ] + tmp_ids = ic_tmp_ids (hsc_IC hsc_env) + filtered = foldr f (const []) tmp_ids emptyUniqSet + f id rest set + | uniq `elementOfUniqSet` set = rest set + | otherwise = AnId id : rest (addOneToUniqSet set uniq) + where uniq = getUnique (nameOccName (idName id)) in - return (map AnId (occEnvElts env)) + return filtered getPrintUnqual :: Session -> IO PrintUnqualified getPrintUnqual s = withSession s (return . icPrintUnqual . hsc_IC)