From: Simon Marlow Date: Thu, 8 Mar 2007 13:45:43 +0000 (+0000) Subject: small cleanups X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=aee2068e034aca6ddaf6f20f85902137ecf718b7;p=ghc-hetmet.git small cleanups --- diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index fba4afb..67ef57d 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1066,9 +1066,9 @@ runPhase_MoveBinary dflags input_fn pvm_executable_base = "=" ++ input_fn pvm_executable = pvm_root ++ "/bin/" ++ pvm_arch ++ "/" ++ pvm_executable_base -- nuke old binary; maybe use configur'ed names for cp and rm? - system ("rm -f " ++ pvm_executable) + Panic.try (removeFile pvm_executable) -- move the newly created binary into PVM land - system ("cp -p " ++ input_fn ++ " " ++ pvm_executable) + copy dflags "copying PVM executable" input_fn pvm_executable -- generate a wrapper script for running a parallel prg under PVM writeFile input_fn (mk_pvm_wrapper_script pvm_executable pvm_executable_base sysMan) return True diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 9885b8d..b657f91 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -29,9 +29,6 @@ module SysTools ( cleanTempDirs, cleanTempFiles, cleanTempFilesExcept, addFilesToClean, - -- System interface - system, -- String -> IO ExitCode - Option(..) ) where @@ -49,7 +46,6 @@ import FiniteMap import Control.Exception import Data.IORef -import Data.Int import Control.Monad import System.Exit import System.Environment @@ -59,12 +55,6 @@ import System.Directory import Data.Maybe import Data.List --- GHC <= 4.08 didn't have rawSystem, and runs into problems with long command --- lines on mingw32, so we disallow it now. -#if __GLASGOW_HASKELL__ < 500 -#error GHC >= 5.00 is required for bootstrapping GHC -#endif - #ifndef mingw32_HOST_OS #if __GLASGOW_HASKELL__ > 504 import qualified System.Posix.Internals @@ -72,8 +62,6 @@ import qualified System.Posix.Internals import qualified Posix #endif #else /* Must be Win32 */ -import List ( isPrefixOf ) -import Util ( dropList ) import Foreign import CString ( CString, peekCString ) #endif @@ -86,7 +74,6 @@ import Compat.RawSystem ( rawSystem ) import System.Cmd ( system ) import GHC.IOBase ( IOErrorType(..) ) #else -import System.Cmd ( rawSystem, system ) import System.Process ( runInteractiveProcess, getProcessExitCode ) import Control.Concurrent( forkIO, newChan, readChan, writeChan ) import Data.Char ( isSpace )