diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2018-05-13 19:32:29 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2018-05-13 19:33:56 +0200 |
commit | 00049e2dce93b1e468c3fde3287371eb988aafdc (patch) | |
tree | 60a3b9d567e8cc4cdf95f6c7d751c00b0ae64cb8 /compiler | |
parent | 78db41eaa806206001b80b3d225cd254435a2f83 (diff) | |
download | haskell-00049e2dce93b1e468c3fde3287371eb988aafdc.tar.gz |
Emit info-level log message when package envs are loaded
A common complaint with the new package environment files feature is
that it's not obvious when package environments have been picked up.
This patch applies the same strategy that was already used for `.ghci` files
(which exhibit similar potential for confusion, c.f. #11389) to package
environment files.
For instance, this new notification looks like below for a GHCi invocation which
loads both, a GHCi configuration as well as a package environment:
GHCi, version 8.5.20180512: http://www.haskell.org/ghc/ :? for help
Loaded package environment from /tmp/parsec-3.1.13.0/.ghc.environment.x86_64-linux-8.5.20180512
Loaded GHCi configuration from /home/hvr/.ghci
Prelude>
Addresses #15145
Reviewed By: bgamari, angerman
GHC Trac Issues: #15145
Differential Revision: https://phabricator.haskell.org/D4689
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/main/DynFlags.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index bd3e2a087a..6e839cc390 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -4959,6 +4959,9 @@ interpretPackageEnv dflags = do return dflags Just envfile -> do content <- readFile envfile + putLogMsg dflags NoReason SevInfo noSrcSpan + (defaultUserStyle dflags) + (text ("Loaded package environment from " ++ envfile)) let setFlags :: DynP () setFlags = do setGeneralFlag Opt_HideAllPackages |