FIX BUILD (on Windows)
authorSimon Marlow <marlowsd@gmail.com>
Wed, 9 Jul 2008 12:31:10 +0000 (12:31 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 9 Jul 2008 12:31:10 +0000 (12:31 +0000)
GHC/ConsoleHandler.hs
GHC/TopHandler.lhs

index 8cd5d5e..aaf01c3 100644 (file)
@@ -38,7 +38,7 @@ import GHC.IOBase
 import GHC.Conc
 import GHC.Handle
 import Data.Typeable
-import Control.Concurrent
+import Control.Concurrent.MVar
 
 data Handler
  = Default
index 7077073..cf5123e 100644 (file)
@@ -37,6 +37,9 @@ import GHC.Exception
 import GHC.Prim
 import GHC.Conc
 import GHC.Weak
+#ifdef mingw32_HOST_OS
+import GHC.ConsoleHandler
+#endif
 
 -- | 'runMainIO' is wrapped around 'Main.main' (or whatever main is
 -- called in the program).  It catches otherwise uncaught exceptions,
@@ -59,7 +62,7 @@ runMainIO main =
 
 install_interrupt_handler :: IO () -> IO ()
 #ifdef mingw32_HOST_OS
-install_interrupt_handler handler = 
+install_interrupt_handler handler = do
   GHC.ConsoleHandler.installHandler $
      Catch $ \event -> 
         case event of
@@ -67,6 +70,7 @@ install_interrupt_handler handler =
            Break    -> handler
            Close    -> handler
            _ -> return ()
+  return ()
 #else
 #include "Signals.h"
 -- specialised version of System.Posix.Signals.installHandler, which