summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorKwang Yul Seo <kwangyul.seo@gmail.com>2016-01-13 14:54:33 +0100
committerBen Gamari <ben@smart-cactus.org>2016-01-13 15:23:17 +0100
commitc3f92464bf64dacae76dc9b3566df9a9f6b3a85b (patch)
tree9fa9932b7caea40ea8944fa7cfb38f9e143ab1b0 /ghc
parente782e882ba455c671cb35751053822a74a9f66b7 (diff)
downloadhaskell-c3f92464bf64dacae76dc9b3566df9a9f6b3a85b.tar.gz
Print a message when loading a .ghci file.
Test Plan: ./validate Reviewers: austin, thomie, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D1756 GHC Trac Issues: #11389
Diffstat (limited to 'ghc')
-rw-r--r--ghc/GHCi/UI.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 1303af554f..29d3688cca 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -525,6 +525,7 @@ runGHCi paths maybe_exprs = do
do runInputTWithPrefs defaultPrefs defaultSettings $
runCommands $ fileLoop hdl
liftIO (hClose hdl `catchIO` \_ -> return ())
+ liftIO $ putStrLn ("Loaded GHCi configuration from " ++ file)
--
@@ -533,12 +534,13 @@ runGHCi paths maybe_exprs = do
dot_cfgs <- if ignore_dot_ghci then return [] else do
dot_files <- catMaybes <$> sequence [ current_dir, app_user_dir, home_dir ]
liftIO $ filterM checkFileAndDirPerms dot_files
+ mdot_cfgs <- liftIO $ mapM canonicalizePath' dot_cfgs
+
let arg_cfgs = reverse $ ghciScripts dflags
-- -ghci-script are collected in reverse order
- mcfgs <- liftIO $ mapM canonicalizePath' $ dot_cfgs ++ arg_cfgs
-- We don't require that a script explicitly added by -ghci-script
-- is owned by the current user. (#6017)
- mapM_ sourceConfigFile $ nub $ catMaybes mcfgs
+ mapM_ sourceConfigFile $ nub $ (catMaybes mdot_cfgs) ++ arg_cfgs
-- nub, because we don't want to read .ghci twice if the CWD is $HOME.
-- Perform a :load for files given on the GHCi command line