X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FGhciMonad.hs;h=df588aab0aa615eee084a90b7181e6a18f963021;hb=e940d0ad629747fd30d1dc318a4c1ab893ac7222;hp=04c5ffa7361dbcdc10c5f528ff9033677dda7f23;hpb=8bc615fdb45b8e3f2f3ef2167bbb379bf619aab2;p=ghc-hetmet.git diff --git a/compiler/ghci/GhciMonad.hs b/compiler/ghci/GhciMonad.hs index 04c5ffa..df588aa 100644 --- a/compiler/ghci/GhciMonad.hs +++ b/compiler/ghci/GhciMonad.hs @@ -140,13 +140,14 @@ handler :: Exception -> GHCi Bool handler (DynException dyn) | Just StopChildSession <- fromDynamic dyn -- propagate to the parent session - = ASSERTM (liftM not isTopLevel) >> throwDyn StopChildSession + = do ASSERTM (liftM not isTopLevel) + throwDyn StopChildSession | Just (ChildSessionStopped msg) <- fromDynamic dyn -- Revert CAFs and display some message - = ASSERTM (isTopLevel) >> - io (revertCAFs >> putStrLn msg) >> - return False + = do ASSERTM (isTopLevel) + io (revertCAFs >> putStrLn msg) + return False handler exception = do flushInterpBuffers @@ -231,7 +232,7 @@ no_buf_cmd = "System.IO.hSetBuffering System.IO.stdout System.IO.NoBuffering" ++ " Prelude.>> System.IO.hSetBuffering System.IO.stderr System.IO.NoBuffering" flush_cmd = "System.IO.hFlush System.IO.stdout Prelude.>> System.IO.hFlush System.IO.stderr" -initInterpBuffering :: Session -> IO () +initInterpBuffering :: GHC.Session -> IO () initInterpBuffering session = do maybe_hval <- GHC.compileExpr session no_buf_cmd