[project @ 2001-03-01 17:07:49 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / PackageMaintenance.hs
index ebfb68f..bd296d4 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: PackageMaintenance.hs,v 1.3 2000/10/26 16:21:02 sewardj Exp $
+-- $Id: PackageMaintenance.hs,v 1.6 2000/12/18 20:42:14 qrczak Exp $
 --
 -- GHC Driver program
 --
@@ -7,11 +7,14 @@
 --
 -----------------------------------------------------------------------------
 
-module PackageMaintenance where
+module PackageMaintenance 
+     ( listPackages, newPackage, deletePackage 
+     ) where
 
 import CmStaticInfo
 import DriverState
 import DriverUtil
+import Panic
 
 import Exception
 import IOExts
@@ -78,7 +81,7 @@ maybeRestoreOldConfig conf_file io
         hPutStr stdout "\nWARNING: an error was encountered while the new \n\ 
                       \configuration was being written.  Attempting to \n\ 
                       \restore the old configuration... "
-        system ("cp " ++ conf_file ++ ".old " ++ conf_file)
+        kludgedSystem ("cp " ++ conf_file ++ ".old " ++ conf_file) "Restoring old configuration"
         hPutStrLn stdout "done."
        throw e
     )
@@ -98,7 +101,7 @@ savePackageConfig conf_file = do
     -- mv rather than cp because we've already done an hGetContents
     -- on this file so we won't be able to open it for writing
     -- unless we move the old one out of the way...
-  system ("mv " ++ conf_file ++ " " ++ conf_file ++ ".old")
+  kludgedSystem ("mv " ++ conf_file ++ " " ++ conf_file ++ ".old") "Saving package configuration"
   hPutStrLn stdout "done."
 
 -----------------------------------------------------------------------------