X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FInteractiveUI.hs;h=b6c3829054cc910e79369ba4c1663a0a7aedae60;hb=9ac80e8f546551607ed2193d884fa9252f166f98;hp=4160844c925098123ae020f75d29a77d6af94e15;hpb=3a481f5449f5e5523ac20917f2b723daa1fbad2f;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index 4160844..b6c3829 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.13 2000/11/22 15:51:48 simonmar Exp $ +-- $Id: InteractiveUI.hs,v 1.14 2000/11/22 17:51:16 simonmar Exp $ -- -- GHC Interactive User Interface -- @@ -19,7 +19,6 @@ import DriverState import Linker import Module import Outputable -import Panic import Util import Exception @@ -71,8 +70,8 @@ helpText = "\ \ :! run the shell command \n\ \" -interactiveUI :: CmState -> IO () -interactiveUI st = do +interactiveUI :: CmState -> [ModuleName] -> IO () +interactiveUI st mods = do hPutStrLn stdout ghciWelcomeMsg hFlush stdout hSetBuffering stdout NoBuffering @@ -84,10 +83,14 @@ interactiveUI st = do #ifndef NO_READLINE Readline.initialize #endif - _ <- (unGHCi uiLoop) GHCiState{ modules = [], - current_module = defaultCurrentModule, - target = Nothing, - cmstate = st } + let this_mod = case mods of + [] -> defaultCurrentModule + m:ms -> m + + (unGHCi uiLoop) GHCiState{ modules = mods, + current_module = this_mod, + target = Nothing, + cmstate = st } return () uiLoop :: GHCi ()