UNDO: Extend ModBreaks with the srcspan's of the enclosing expressions
[ghc-hetmet.git] / compiler / main / GHC.hs
index bf276d5..145d6bd 100644 (file)
@@ -94,7 +94,7 @@ module GHC (
         isModuleInterpreted,
        compileExpr, HValue, dynCompileExpr,
        lookupName,
-        obtainTerm, obtainTerm1,
+        GHC.obtainTerm, GHC.obtainTerm1, GHC.obtainTermB, reconstructType,
         modInfoModBreaks,
         ModBreaks(..), BreakIndex,
         BreakInfo(breakInfo_number, breakInfo_module),
@@ -273,7 +273,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 +542,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 +1987,17 @@ 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
+
+obtainTerm :: Session -> Bool -> Id -> IO Term
+obtainTerm sess force id = withSession sess $ \hsc_env ->
+                            InteractiveEval.obtainTerm hsc_env force id
+
+obtainTerm1 :: Session -> Bool -> Maybe Type -> a -> IO Term
+obtainTerm1 sess force mb_ty a = withSession sess $ \hsc_env ->
+                               InteractiveEval.obtainTerm1 hsc_env force mb_ty a
+
+obtainTermB :: Session -> Int -> Bool -> Id -> IO Term
+obtainTermB sess bound force id = withSession sess $ \hsc_env ->
+                            InteractiveEval.obtainTermB hsc_env bound force id
+
+#endif