A partial attempt to improve :stepover
[ghc-hetmet.git] / compiler / main / GHC.hs
index bf276d5..4c14ff6 100644 (file)
@@ -85,7 +85,8 @@ module GHC (
         Resume(resumeStmt, resumeThreadId, resumeBreakInfo, resumeSpan,
                resumeHistory, resumeHistoryIx),
         History(historyBreakInfo, historyEnclosingDecl), 
-        GHC.getHistorySpan, getHistoryModule,
+        GHC.getHistorySpan, getHistoryModule, getHistoryTick,
+        GHC.findEnclosingDeclSpanByTick,
         getResumeContext,
         abandon, abandonAll,
         InteractiveEval.back,
@@ -273,7 +274,7 @@ import Control.Exception as Exception hiding (handle)
 import Data.IORef
 import System.IO
 import System.IO.Error ( try, isDoesNotExistError )
-import Prelude hiding (init, catch)
+import Prelude hiding (init)
 
 
 -- -----------------------------------------------------------------------------
@@ -542,7 +543,7 @@ load s@(Session ref) how_much
        case mb_graph of
           Just mod_graph -> catchingFailure $ load2 s how_much mod_graph
           Nothing        -> return Failed
-    where catchingFailure f = f `catch` \e -> do
+    where catchingFailure f = f `Exception.catch` \e -> do
               hsc_env <- readIORef ref
               -- trac #1565 / test ghci021:
               -- let bindings may explode if we try to use them after
@@ -1987,4 +1988,8 @@ findModule' hsc_env mod_name maybe_pkg =
 getHistorySpan :: Session -> History -> IO SrcSpan
 getHistorySpan sess h = withSession sess $ \hsc_env -> 
                           return$ InteractiveEval.getHistorySpan hsc_env h
-#endif
\ No newline at end of file
+
+findEnclosingDeclSpanByTick :: Session -> Module -> BreakIndex -> IO SrcSpan
+findEnclosingDeclSpanByTick sess m t = withSession sess $ \ hsc_env -> 
+               return$ InteractiveEval.findEnclosingDeclSpanByTick hsc_env m t
+#endif