[project @ 2000-12-11 16:42:26 by sewardj]
[ghc-hetmet.git] / ghc / compiler / main / Main.hs
index 13aa963..5786dec 100644 (file)
@@ -1,6 +1,6 @@
-{-# OPTIONS -W -fno-warn-incomplete-patterns #-}
+{-# OPTIONS -fno-warn-incomplete-patterns #-}
 -----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.33 2000/11/24 09:51:39 simonpj Exp $
+-- $Id: Main.hs,v 1.36 2000/12/11 16:42:26 sewardj Exp $
 --
 -- GHC Driver program
 --
@@ -19,7 +19,11 @@ module Main (main) where
 #ifdef GHCI
 import Interpreter
 import InteractiveUI
+#endif
+
+#ifndef mingw32_TARGET_OS
 import Dynamic
+import Posix
 #endif
 
 import CompManager
@@ -40,9 +44,6 @@ import Util
 
 
 import Concurrent
-#ifndef mingw32_TARGET_OS
-import Posix
-#endif
 import Directory
 import IOExts
 import Exception
@@ -301,11 +302,10 @@ beginInteractive = throwDyn (OtherError "not build for interactive use")
 #else
 beginInteractive mods
   = do state <- cmInit Interactive
-       (state', ok, ms) 
-         <- case mods of
-               []    -> return (state, True, [])
-               [mod] -> cmLoadModule state mod
+       let mod = case mods of
+               []    -> Nothing
+               [mod] -> Just mod
                _     -> throwDyn (UsageError 
                                    "only one module allowed with --interactive")
-       interactiveUI state' ms
+       interactiveUI state mod
 #endif