[project @ 2001-08-08 08:44:47 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / Main.hs
index 5a7d6c5..9db7ba3 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -fno-warn-incomplete-patterns #-}
 -----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.83 2001/08/03 23:38:50 ken Exp $
+-- $Id: Main.hs,v 1.85 2001/08/08 08:44:47 simonmar Exp $
 --
 -- GHC Driver program
 --
@@ -114,20 +114,14 @@ main =
   handle (\exception -> do
           case exception of
                -- an IO exception probably isn't our fault, so don't panic
-               IOException _   ->  hPutStr stderr (show exception)
-#if __GLASGOW_HASKELL__ >= 501
-                 -- let exit exceptions bubble all the way out.
-               ExitException e ->  exitWith e
-#endif
-               _other          ->  hPutStr stderr (show (Panic (show exception)))
+               IOException _ ->  hPutStr stderr (show exception)
+               _other        ->  hPutStr stderr (show (Panic (show exception)))
           exitWith (ExitFailure 1)
          ) $ do
 
   -- all error messages are propagated as exceptions
   handleDyn (\dyn -> case dyn of
-                         PhaseFailed _phase code -> do
-                                       hPutStr stderr "\nCompilation had errors\n"
-                                       exitWith code
+                         PhaseFailed _phase code -> exitWith code
                          Interrupted -> exitWith (ExitFailure 1)
                          _ -> do hPutStrLn stderr (show (dyn :: GhcException))
                                  exitWith (ExitFailure 1)