FIX #1681: withBreakAction had too large a scope in runStmt
authorSimon Marlow <simonmar@microsoft.com>
Wed, 10 Oct 2007 08:58:20 +0000 (08:58 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Wed, 10 Oct 2007 08:58:20 +0000 (08:58 +0000)
compiler/main/InteractiveEval.hs

index 9afedae..bfcf5f6 100644 (file)
@@ -209,10 +209,10 @@ runStmt (Session ref) expr step
           Nothing -> return RunFailed
           Just (ids, hval) -> do
 
-              withBreakAction (isStep step) dflags' breakMVar statusMVar $ do
-
-              let thing_to_run = unsafeCoerce# hval :: IO [HValue]
-              status <- sandboxIO dflags' statusMVar thing_to_run
+              status <- 
+                withBreakAction (isStep step) dflags' breakMVar statusMVar $ do
+                      let thing_to_run = unsafeCoerce# hval :: IO [HValue]
+                      sandboxIO dflags' statusMVar thing_to_run
               
               let ic = hsc_IC hsc_env
                   bindings = (ic_tmp_ids ic, ic_tyvars ic)