summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-06-14 12:34:27 +0000
committerIan Lynagh <igloo@earth.li>2008-06-14 12:34:27 +0000
commit6b476a9ab73f1d768c548ddef900f9b9e4a0dd6b (patch)
treeacc217ddeae8099c5dc9bb64bf6550fce99da007
parent06c159151e9cdecbe0602700a88147d2d1e4e225 (diff)
downloadhaskell-6b476a9ab73f1d768c548ddef900f9b9e4a0dd6b.tar.gz
Pass dynflags down to loadPackageConfig rather than using defaultDynFlags
-rw-r--r--compiler/main/Packages.lhs2
-rw-r--r--compiler/main/ParsePkgConf.y6
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/main/Packages.lhs b/compiler/main/Packages.lhs
index 6a5b63cedb..c8b7d69a8f 100644
--- a/compiler/main/Packages.lhs
+++ b/compiler/main/Packages.lhs
@@ -231,7 +231,7 @@ readPackageConfig
:: DynFlags -> PackageConfigMap -> FilePath -> IO PackageConfigMap
readPackageConfig dflags pkg_map conf_file = do
debugTraceMsg dflags 2 (text "Using package config file:" <+> text conf_file)
- proto_pkg_configs <- loadPackageConfig conf_file
+ proto_pkg_configs <- loadPackageConfig dflags conf_file
let top_dir = topDir dflags
pkg_configs1 = mungePackagePaths top_dir proto_pkg_configs
pkg_configs2 = maybeHidePackages dflags pkg_configs1
diff --git a/compiler/main/ParsePkgConf.y b/compiler/main/ParsePkgConf.y
index 1a13108ba3..1f6434b468 100644
--- a/compiler/main/ParsePkgConf.y
+++ b/compiler/main/ParsePkgConf.y
@@ -149,11 +149,11 @@ strs :: { [FastString] }
happyError :: P a
happyError = srcParseFail
-loadPackageConfig :: FilePath -> IO [PackageConfig]
-loadPackageConfig conf_filename = do
+loadPackageConfig :: DynFlags -> FilePath -> IO [PackageConfig]
+loadPackageConfig dflags conf_filename = do
buf <- hGetStringBuffer conf_filename
let loc = mkSrcLoc (mkFastString conf_filename) 1 0
- case unP parse (mkPState buf loc defaultDynFlags) of
+ case unP parse (mkPState buf loc dflags) of
PFailed span err ->
throwDyn (InstallationError (showSDoc (mkLocMessage span err)))