Commit c3f92464 authored by kseo's avatar kseo Committed by Ben Gamari
Browse files

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
parent e782e882
......@@ -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
......
"T10408A"
Loaded GHCi configuration from T10408A.script
"T10408B"
Loaded GHCi configuration from T10408B.script
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment