X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fghc-pkg%2FMain.hs;h=f79ebab67783b39712779bc28b744f05730aa55c;hb=740618f2b7d822f53528d271ccfb617c8ce84c55;hp=19052a5e2ce3fefcd63a6e1b35b262d6e3195d33;hpb=1c83695b5b9ae3175c18908c1d58aeadb1f225ae;p=ghc-hetmet.git diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 19052a5..f79ebab 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -360,7 +360,7 @@ parseGlobPackageId = parse +++ (do n <- parse - string "-*" + _ <- string "-*" return (PackageIdentifier{ pkgName = n, pkgVersion = globVersion })) -- globVersion means "all versions" @@ -506,7 +506,7 @@ readParseDatabase mb_user_conf filename | otherwise = do str <- readFile filename let packages = map convertPackageInfoIn $ read str - Exception.evaluate packages + _ <- Exception.evaluate packages `catchError` \e-> die ("error while parsing " ++ filename ++ ": " ++ show e) return (filename,packages) @@ -813,7 +813,7 @@ checkConsistency my_flags = do else do when (not simple_output) $ do reportError ("There are problems in package " ++ display (package p) ++ ":") - reportValidateErrors es " " Nothing + _ <- reportValidateErrors es " " Nothing return () return [p] @@ -1247,8 +1247,8 @@ installSignalHandlers = do (Exception.ErrorCall "interrupted") -- #if !defined(mingw32_HOST_OS) - installHandler sigQUIT (Catch interrupt) Nothing - installHandler sigINT (Catch interrupt) Nothing + _ <- installHandler sigQUIT (Catch interrupt) Nothing + _ <- installHandler sigINT (Catch interrupt) Nothing return () #elif __GLASGOW_HASKELL__ >= 603 -- GHC 6.3+ has support for console events on Windows @@ -1260,7 +1260,7 @@ installSignalHandlers = do sig_handler Break = interrupt sig_handler _ = return () - installHandler (Catch sig_handler) + _ <- installHandler (Catch sig_handler) return () #else return () -- nothing @@ -1342,8 +1342,12 @@ openNewFile dir template = do oflags = rw_flags .|. o_EXCL +#if __GLASGOW_HASKELL__ < 611 + withFilePath = withCString +#endif + findTempName x = do - fd <- withCString filepath $ \ f -> + fd <- withFilePath filepath $ \ f -> c_open f oflags 0o666 if fd < 0 then do