diff options
author | Kwang Yul Seo <kwangyul.seo@gmail.com> | 2016-01-13 14:54:33 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-01-13 15:23:17 +0100 |
commit | c3f92464bf64dacae76dc9b3566df9a9f6b3a85b (patch) | |
tree | 9fa9932b7caea40ea8944fa7cfb38f9e143ab1b0 | |
parent | e782e882ba455c671cb35751053822a74a9f66b7 (diff) | |
download | haskell-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
-rw-r--r-- | ghc/GHCi/UI.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T10408.stdout | 2 |
2 files changed, 6 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 diff --git a/testsuite/tests/ghci/scripts/T10408.stdout b/testsuite/tests/ghci/scripts/T10408.stdout index b13d0a49f8..cef83bc2a3 100644 --- a/testsuite/tests/ghci/scripts/T10408.stdout +++ b/testsuite/tests/ghci/scripts/T10408.stdout @@ -1,2 +1,4 @@ "T10408A" +Loaded GHCi configuration from T10408A.script "T10408B" +Loaded GHCi configuration from T10408B.script |