From: sewardj Date: Mon, 27 Nov 2000 12:52:36 +0000 (+0000) Subject: [project @ 2000-11-27 12:52:36 by sewardj] X-Git-Tag: Approximately_9120_patches~3238 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7bfa8aad58f507c749d9c69203d13e5e5b6e301d;p=ghc-hetmet.git [project @ 2000-11-27 12:52:36 by sewardj] Update modules and current_module in reloadModule. --- 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 ()