X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=inline;f=ghc%2Futils%2Fghc-pkg%2FMain.hs;h=954d1f62e38871f03099e03cfdeaedaf238a3a1a;hb=423d477bfecd490de1449c59325c8776f91d7aac;hp=29040e4a87ea7f119d7493b3ae38f58102544e11;hpb=0e7b8c87f32cbdbb931a01537a578ee30ac2e026;p=ghc-hetmet.git diff --git a/ghc/utils/ghc-pkg/Main.hs b/ghc/utils/ghc-pkg/Main.hs index 29040e4..954d1f6 100644 --- a/ghc/utils/ghc-pkg/Main.hs +++ b/ghc/utils/ghc-pkg/Main.hs @@ -29,7 +29,7 @@ import List ( isPrefixOf, isSuffixOf ) import ParsePkgConfLite -#include "../../includes/config.h" +#include "../../includes/ghcconfig.h" #ifdef mingw32_HOST_OS import Foreign @@ -84,8 +84,7 @@ copyright = "GHC package manager version " ++ version ++ "\n" -- hackery to convice cpp to splice GHC_PKG_VERSION into a string version :: String -version = tail "\ - \ GHC_PKG_VERSION" +version = GHC_PKG_VERSION usageHeader :: String -> String usageHeader prog = "Usage: " ++ prog ++ " [OPTION...]\n" @@ -256,9 +255,9 @@ checkConfigAccess filename = do maybeRestoreOldConfig :: FilePath -> IO () -> IO () maybeRestoreOldConfig filename io = my_catch io (\e -> do - hPutStr stdout "\nWARNING: an error was encountered while the new \n\ - \configuration was being written. Attempting to \n\ - \restore the old configuration... " + hPutStr stdout ("\nWARNING: an error was encountered while the new \n"++ + "configuration was being written. Attempting to \n"++ + "restore the old configuration... ") renameFile (filename ++ ".old") filename hPutStrLn stdout "done." my_throw e