diff options
| author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-03-19 16:06:55 -0700 |
|---|---|---|
| committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-03-20 13:59:23 -0700 |
| commit | 40b65db4cd34c3566b9f6c53c086d53e97574217 (patch) | |
| tree | 583e00c9150a53c7015c0eb6f5b2d36b4e094d6b /compiler | |
| parent | 09485bba2b9a4a78dc7c628187d5fd9b8bab3ecd (diff) | |
| download | haskell-40b65db4cd34c3566b9f6c53c086d53e97574217.tar.gz | |
Document the perplexing reversed nature of extraPkgConfs and friends.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/main/DynFlags.hs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index f80f9a71fc..057c2c0071 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -805,16 +805,26 @@ data DynFlags = DynFlags { -- Package flags extraPkgConfs :: [PkgConfRef] -> [PkgConfRef], -- ^ The @-package-db@ flags given on the command line, in the order - -- they appeared. + -- they appeared. In *reverse* order that they're specified + -- on the command line. This is intended to be applied with the + -- list of "initial" package databases derived from @GHC_PACKAGE_PATH@; + -- see 'getPackageConfRefs'; this is a function because 'extraPkgConfs' + -- maybe configured to filter out certain flags from *either* the + -- user command line, or the base command; see for example + -- 'removeUserPkgConf'. ignorePackageFlags :: [IgnorePackageFlag], - -- ^ The @-ignore-package@ flags from the command line + -- ^ The @-ignore-package@ flags from the command line. + -- In *reverse* order that they're specified on the command line. packageFlags :: [PackageFlag], - -- ^ The @-package@ and @-hide-package@ flags from the command-line + -- ^ The @-package@ and @-hide-package@ flags from the command-line. + -- In *reverse* order that they're specified on the command line. pluginPackageFlags :: [PackageFlag], - -- ^ The @-plugin-package-id@ flags from command line + -- ^ The @-plugin-package-id@ flags from command line. + -- In *reverse* order that they're specified on the command line. trustFlags :: [TrustFlag], - -- ^ The @-trust@ and @-distrust@ flags + -- ^ The @-trust@ and @-distrust@ flags. + -- In *reverse* order that they're specified on the command line. packageEnv :: Maybe FilePath, -- ^ Filepath to the package environment file (if overriding default) |
