[project @ 2002-11-07 14:42:25 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / SysTools.lhs
index 64e7c5c..a6f7bf9 100644 (file)
@@ -77,7 +77,6 @@ import qualified EXCEPTION as Exception ( catch )
 import EXCEPTION        ( catchAllIO )
 #endif
 
-import CString         ( CString, peekCString )
 import DATA_IOREF      ( IORef, readIORef, writeIORef )
 import DATA_INT
     
@@ -100,12 +99,11 @@ import qualified GHC.Posix
 #else
 import qualified Posix
 #endif
-#else
+#else /* Must be Win32 */
 import List            ( isPrefixOf )
 import Util            ( dropList )
--- import Foreign.Marshal.Array
 import Foreign
--- import CString
+import CString         ( CString, peekCString )
 #endif
 
 #ifdef mingw32_HOST_OS
@@ -117,14 +115,6 @@ import SystemExts       ( rawSystem )
 #else
 import System          ( system )
 #endif
-
--- Make catch work on older GHCs
-#if __GLASGOW_HASKELL__ > 408
-myCatch = Exception.catch
-#else
-myCatch = catchAllIO
-#endif
-
 \end{code}
 
 
@@ -677,7 +667,7 @@ removeTmpFiles verb fs
             ("Deleting: " ++ unwords fs)
             (mapM_ rm fs)
   where
-    rm f = removeFile f `myCatch` 
+    rm f = removeFile f `catch` 
                (\_ignored -> 
                    when (verb >= 2) $
                      hPutStrLn stderr ("Warning: deleting non-existent " ++ f)
@@ -739,7 +729,7 @@ traceCmd phase_name cmd_line action
        ; unless n $ do {
 
           -- And run it!
-       ; action `myCatch` handle_exn verb
+       ; action `catch` handle_exn verb
        }}
   where
     handle_exn verb exn = do { when (verb >= 2) (hPutStr   stderr "\n")