diff options
author | Paolo Capriotti <p.capriotti@gmail.com> | 2012-04-11 14:34:25 +0100 |
---|---|---|
committer | Paolo Capriotti <p.capriotti@gmail.com> | 2012-04-11 18:03:02 +0100 |
commit | 76bde331226e933b65b6433e983c50da1ce3b532 (patch) | |
tree | e404e7e3f8e45a2591ed49ccbee65c7027444066 /ghc/InteractiveUI.hs | |
parent | ab52df86f5f76da6e19ee6562792ea43972a6f24 (diff) | |
download | haskell-76bde331226e933b65b6433e983c50da1ce3b532.tar.gz |
Add support for additional .ghci files in GHCi (#5265)
Patch by Sam Anklesaria <amsay@amsay.net>
Diffstat (limited to 'ghc/InteractiveUI.hs')
-rw-r--r-- | ghc/InteractiveUI.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 9761f42003..b7e6241033 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -432,8 +432,9 @@ runGHCi paths maybe_exprs = do setGHCContextFromGHCiState + dflags <- getDynFlags when (read_dot_files) $ do - mcfgs0 <- sequence [ current_dir, app_user_dir, home_dir ] + mcfgs0 <- sequence $ [ current_dir, app_user_dir, home_dir ] ++ map (return . Just ) (ghciScripts dflags) mcfgs <- liftIO $ mapM canonicalizePath' (catMaybes mcfgs0) mapM_ sourceConfigFile $ nub $ catMaybes mcfgs -- nub, because we don't want to read .ghci twice if the @@ -455,7 +456,6 @@ runGHCi paths maybe_exprs = do -- if verbosity is greater than 0, or we are connected to a -- terminal, display the prompt in the interactive loop. is_tty <- liftIO (hIsTerminalDevice stdin) - dflags <- getDynFlags let show_prompt = verbosity dflags > 0 || is_tty -- reset line number |