[project @ 2002-04-05 15:18:25 by sof]
[ghc-hetmet.git] / ghc / compiler / main / Main.hs
index 0c60aff..ee84cd0 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-}
 
 -----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.100 2002/03/13 13:51:35 simonmar Exp $
+-- $Id: Main.hs,v 1.102 2002/03/29 21:39:37 sof Exp $
 --
 -- GHC Driver program
 --
@@ -66,14 +66,14 @@ import Monad
 import List
 import Maybe
 
-#ifndef mingw32_TARGET_OS
+#ifndef mingw32_HOST_OS
 import Concurrent      ( myThreadId )
-#if __GLASGOW_HASKELL__ < 500
+# if __GLASGOW_HASKELL__ < 500
 import Exception        ( raiseInThread )
 #define throwTo  raiseInThread
-#else
+# else
 import Exception       ( throwTo )
-#endif
+# endif
 
 import Posix           ( Handler(Catch), installHandler, sigINT, sigQUIT )
 import Dynamic         ( toDyn )
@@ -137,7 +137,7 @@ main =
        -- signals.
 
        -- install signal handlers
-#ifndef mingw32_TARGET_OS
+#ifndef mingw32_HOST_OS
    main_thread <- myThreadId
    let sig_handler = Catch (throwTo main_thread 
                                (DynException (toDyn Interrupted)))
@@ -280,15 +280,19 @@ main =
          let not_hs_file  = not (haskellish_src_file src)
          pp <- if not_hs_file || mode == StopBefore Hsc || mode == StopBefore HsPp
                        then return src_and_suff else do
+--             hPutStrLn stderr "before" >> hFlush stderr
                phases <- genPipeline (StopBefore Hsc) stop_flag
                                      False{-not persistent-} defaultHscLang
                                      src_and_suff
+--             hPutStrLn stderr "after" >> hFlush stderr
                pipeLoop phases src_and_suff False{-no linking-} False{-no -o flag-}
                        basename suffix
 
          -- rest of compilation
          hsc_lang <- dynFlag hscLang
+--       hPutStrLn stderr ("before-1 " ++ show (pp,mode)) >> hFlush stderr
          phases   <- genPipeline mode stop_flag True hsc_lang pp
+--       hPutStrLn stderr "after" >> hFlush stderr
          (r,_)    <- pipeLoop phases pp (mode==DoLink || mode==DoMkDLL)
                                      True{-use -o flag-} basename suffix
          return r