X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FSysTools.lhs;h=bd4aacb452244393c9753e0b56b0fe5376c49292;hb=599e42c2948811e71607c5167d9345ddd74d83c3;hp=2e5d8de18ce56dc3e6267d267c0dfeb1cbdb65df;hpb=2cc392e73116d4cdf54b99511e3d1fa8b8e76586;p=ghc-hetmet.git diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 2e5d8de..bd4aacb 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------- -- --- (c) The University of Glasgow 2001 +-- (c) The University of Glasgow 2001-2003 -- -- Access to system tools: gcc, cp, rm etc -- @@ -28,6 +28,7 @@ module SysTools ( getTopDir, -- IO String -- The value of $libdir getPackageConfigPath, -- IO String -- Where package.conf is + getUsageMsgPaths, -- IO (String,String) -- Interface to system tools runUnlit, runCpp, runCc, -- [Option] -> IO () @@ -55,7 +56,6 @@ module SysTools ( system, -- String -> IO ExitCode -- Misc - showGhcUsage, -- IO () Shows usage message and exits getSysMan, -- IO String Parallel system only Option(..) @@ -65,10 +65,10 @@ module SysTools ( #include "HsVersions.h" import DriverUtil -import DriverPhases ( haskellish_user_src_file ) +import DriverPhases ( isHaskellUserSrcFilename ) import Config import Outputable -import Panic ( progName, GhcException(..) ) +import Panic ( GhcException(..) ) import Util ( global, notNull ) import CmdLineOpts ( dynFlag, verbosity ) @@ -77,9 +77,9 @@ import DATA_IOREF ( IORef, readIORef, writeIORef ) import DATA_INT import Monad ( when, unless ) -import System ( ExitCode(..), exitWith, getEnv, system ) +import System ( ExitCode(..), getEnv, system ) import IO ( try, catch, - openFile, hPutChar, hPutStrLn, hPutStr, hClose, hFlush, IOMode(..), + openFile, hPutStrLn, hPutStr, hClose, hFlush, IOMode(..), stderr ) import Directory ( doesFileExist, removeFile ) import List ( intersperse, partition ) @@ -204,7 +204,7 @@ GLOBAL_VAR(v_Pgm_T, error "pgm_T", String) -- touch GLOBAL_VAR(v_Pgm_CP, error "pgm_CP", String) -- cp GLOBAL_VAR(v_Path_package_config, error "path_package_config", String) -GLOBAL_VAR(v_Path_usage, error "ghc_usage.txt", String) +GLOBAL_VAR(v_Path_usages, error "ghc_usage.txt", (String,String)) GLOBAL_VAR(v_TopDir, error "TopDir", String) -- -B