Commit 6b476a9a authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Pass dynflags down to loadPackageConfig rather than using defaultDynFlags

parent 06c15915
......@@ -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
......
......@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment