[project @ 2001-10-23 17:18:38 by sof]
authorsof <unknown>
Tue, 23 Oct 2001 17:18:38 +0000 (17:18 +0000)
committersof <unknown>
Tue, 23 Oct 2001 17:18:38 +0000 (17:18 +0000)
- flushEverything: replaced bogus defn with something less crufty.
- float OPTIONS pragmas to the top; as was, they were ineffective.
  (it might just be a good idea for whoever put in the code which calls
   upon the RTS-local getAllocations() and revertCAFs() to bring some
   protos into scope, if robust software is the goal of this enterprise...)

ghc/compiler/ghci/InteractiveUI.hs

index 6d05abc..eb608b3 100644 (file)
@@ -1,14 +1,12 @@
+{-# OPTIONS -#include "Linker.h" -#include "SchedAPI.h" #-}
 -----------------------------------------------------------------------------
--- $Id: InteractiveUI.hs,v 1.98 2001/10/23 11:42:21 simonmar Exp $
+-- $Id: InteractiveUI.hs,v 1.99 2001/10/23 17:18:38 sof Exp $
 --
 -- GHC Interactive User Interface
 --
 -- (c) The GHC Team 2000
 --
 -----------------------------------------------------------------------------
-
-{-# OPTIONS -#include "Linker.h" #-}
-{-# OPTIONS -#include "SchedAPI.h" #-}
 module InteractiveUI ( interactiveUI, ghciWelcomeMsg ) where
 
 #include "../includes/config.h"
@@ -60,7 +58,7 @@ import CPUTime
 import Directory
 import IO
 import Char
-import Monad           ( when )
+import Monad           ( when, join )
 
 import PrelGHC                 ( unsafeCoerce# )
 import Foreign         ( nullPtr )
@@ -375,10 +373,8 @@ showTypeOfName cmstate n
 
 flushEverything :: GHCi ()
 flushEverything
-   = io $ do flush_so <- readIORef flush_stdout
-            flush_so
-            flush_se <- readIORef flush_stdout
-            flush_se
+   = io $ do Monad.join (readIORef flush_stdout)
+            Monad.join (readIORef flush_stderr)
              return ()
 
 specialCommand :: String -> GHCi Bool