Get everything building with base 4 in the HEAD
[ghc-hetmet.git] / utils / runghc / runghc.hs
index 5053858..decbdcd 100644 (file)
@@ -32,6 +32,12 @@ import System.Exit
 import System.FilePath
 import System.IO
 
+#if defined(mingw32_HOST_OS)
+import Control.Monad
+import Foreign
+import Foreign.C.String
+#endif
+
 main :: IO ()
 main = do
     args <- getArgs
@@ -51,8 +57,8 @@ getGhcLoc args = case args of
                  ('-' : 'f' : ghc) : args' -> f ghc args'
                  -- If you need the first GHC flag to be a -f flag then
                  -- you can pass -- first
-                 "--" : args -> (Nothing, args)
-                 args        -> (Nothing, args)
+                 "--" : args' -> (Nothing, args')
+                 _            -> (Nothing, args)
     where f ghc args' = -- If there is another -f flag later on then
                         -- that overrules the one that we've already
                         -- found