Fix building genprimopcode with GHC 7.0, and remove haskell98 imports
[ghc-hetmet.git] / utils / ghc-pkg / Main.hs
index bb836f0..3490b6c 100644 (file)
@@ -1,4 +1,4 @@
-{-# OPTIONS -fglasgow-exts -cpp #-}
+{-# LANGUAGE PatternGuards, CPP, ForeignFunctionInterface #-}
 -----------------------------------------------------------------------------
 --
 -- (c) The University of Glasgow 2004-2009.
@@ -38,7 +38,7 @@ import System.Directory ( doesDirectoryExist, getDirectoryContents,
 import System.Exit ( exitWith, ExitCode(..) )
 import System.Environment ( getArgs, getProgName, getEnv )
 import System.IO
-import System.IO.Error (try, isDoesNotExistError)
+import System.IO.Error
 import Data.List
 import Control.Concurrent
 
@@ -63,8 +63,6 @@ import GHC.ConsoleHandler
 import System.Posix hiding (fdToHandle)
 #endif
 
-import IO ( isPermissionError )
-
 #if defined(GLOB)
 import System.Process(runInteractiveCommand)
 import qualified System.Info(os)
@@ -1698,4 +1696,4 @@ readUTF8File file = do
 removeFileSafe :: FilePath -> IO ()
 removeFileSafe fn =
   removeFile fn `catch` \ e ->
-    when (not $ isDoesNotExistError e) $ ioError e
\ No newline at end of file
+    when (not $ isDoesNotExistError e) $ ioError e