diff options
author | Reid Barton <rwbarton@gmail.com> | 2016-01-22 09:59:20 -0500 |
---|---|---|
committer | Reid Barton <rwbarton@gmail.com> | 2016-01-22 09:59:23 -0500 |
commit | 9048c3dfee1c7c9171114c349714095b3abcc47a (patch) | |
tree | 87b9b147729e3e03680418b49c1abfae4c8ed885 /ghc | |
parent | 2df422161bccf7c0fad97e468085ebab1a17e19e (diff) | |
download | haskell-9048c3dfee1c7c9171114c349714095b3abcc47a.tar.gz |
Don't print "Loaded GHCi configuration" message in ghc -e (#11478)
Summary:
Also don't print it if the user specifically requested
non-verbose output with -v0.
Since this means there is no longer any test that checks
for the message, add such a test.
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1817
GHC Trac Issues: #11478
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/GHCi/UI.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 30e70e043e..fc03b5fbdb 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -527,7 +527,11 @@ runGHCi paths maybe_exprs = do do runInputTWithPrefs defaultPrefs defaultSettings $ runCommands $ fileLoop hdl liftIO (hClose hdl `catchIO` \_ -> return ()) - liftIO $ putStrLn ("Loaded GHCi configuration from " ++ file) + -- Don't print a message if this is really ghc -e (#11478). + -- Also, let the user silence the message with -v0 + -- (the default verbosity in GHCi is 1). + when (isNothing maybe_exprs && verbosity dflags > 0) $ + liftIO $ putStrLn ("Loaded GHCi configuration from " ++ file) -- |