projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Follow changes in the base library
[ghc-hetmet.git]
/
compiler
/
main
/
Packages.lhs
diff --git
a/compiler/main/Packages.lhs
b/compiler/main/Packages.lhs
index
1bafe6c
..
44ad7d1
100644
(file)
--- a/
compiler/main/Packages.lhs
+++ b/
compiler/main/Packages.lhs
@@
-55,6
+55,7
@@
import Distribution.Text
import Distribution.Version
import FastString
import ErrUtils ( debugTraceMsg, putMsg, Message )
import Distribution.Version
import FastString
import ErrUtils ( debugTraceMsg, putMsg, Message )
+import Exception
import System.Directory
import System.FilePath
import System.Directory
import System.FilePath
@@
-172,7
+173,7
@@
initPackages dflags = do
readPackageConfigs :: DynFlags -> IO PackageConfigMap
readPackageConfigs dflags = do
readPackageConfigs :: DynFlags -> IO PackageConfigMap
readPackageConfigs dflags = do
- e_pkg_path <- try (getEnv "GHC_PACKAGE_PATH")
+ e_pkg_path <- tryIO (getEnv "GHC_PACKAGE_PATH")
system_pkgconfs <- getSystemPackageConfigs dflags
let pkgconfs = case e_pkg_path of
system_pkgconfs <- getSystemPackageConfigs dflags
let pkgconfs = case e_pkg_path of
@@
-215,7
+216,7
@@
getSystemPackageConfigs dflags = do
-- unless the -no-user-package-conf flag was given.
-- We only do this when getAppUserDataDirectory is available
-- (GHC >= 6.3).
-- unless the -no-user-package-conf flag was given.
-- We only do this when getAppUserDataDirectory is available
-- (GHC >= 6.3).
- user_pkgconf <- handle (\_ -> return []) $ do
+ user_pkgconf <- do
appdir <- getAppUserDataDirectory "ghc"
let
pkgconf = appdir
appdir <- getAppUserDataDirectory "ghc"
let
pkgconf = appdir
@@
-225,6
+226,7
@@
getSystemPackageConfigs dflags = do
if (flg && dopt Opt_ReadUserPackageConf dflags)
then return [pkgconf]
else return []
if (flg && dopt Opt_ReadUserPackageConf dflags)
then return [pkgconf]
else return []
+ `catchIO` (\_ -> return [])
return (user_pkgconf ++ system_pkgconfs ++ [system_pkgconf])
return (user_pkgconf ++ system_pkgconfs ++ [system_pkgconf])