From 7bfa8aad58f507c749d9c69203d13e5e5b6e301d Mon Sep 17 00:00:00 2001 From: sewardj Date: Mon, 27 Nov 2000 12:52:36 +0000 Subject: [PATCH] [project @ 2000-11-27 12:52:36 by sewardj] Update modules and current_module in reloadModule. --- ghc/compiler/ghci/InteractiveUI.hs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index 8f63eec..564dcf4 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.17 2000/11/27 12:10:01 sewardj Exp $ +-- $Id: InteractiveUI.hs,v 1.18 2000/11/27 12:52:36 sewardj Exp $ -- -- GHC Interactive User Interface -- @@ -241,8 +241,16 @@ reloadModule "" = do case target state of Nothing -> io (putStr "no current target\n") Just path - -> do (new_cmstate, ok, mod) <- io (cmLoadModule (cmstate state) path) - setGHCiState state{cmstate=new_cmstate} + -> do (new_cmstate, ok, mods) <- io (cmLoadModule (cmstate state) path) + setGHCiState + state{cmstate=new_cmstate, + modules = mods, + current_module = case mods of + [] -> defaultCurrentModule + xs -> head xs + } + + reloadModule _ = noArgs ":reload" typeOfExpr :: String -> GHCi () -- 1.7.10.4