From f81c9189fccc07c33506de8480648f28f893d882 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 18 Jan 2001 10:51:53 +0000 Subject: [PATCH] [project @ 2001-01-18 10:51:53 by simonmar] save the state after a ':t' --- ghc/compiler/ghci/InteractiveUI.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index 3b295f1..c3c163a 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.26 2001/01/16 17:09:43 sewardj Exp $ +-- $Id: InteractiveUI.hs,v 1.27 2001/01/18 10:51:53 simonmar Exp $ -- -- GHC Interactive User Interface -- @@ -286,8 +286,9 @@ typeOfExpr :: String -> GHCi () typeOfExpr str = do st <- getGHCiState dflags <- io (getDynFlags) - (st, maybe_ty) <- io (cmGetExpr (cmstate st) dflags + (new_cmstate, maybe_ty) <- io (cmGetExpr (cmstate st) dflags (current_module st) str False) + setGHCiState st{cmstate = new_cmstate} case maybe_ty of Nothing -> return () Just (_, unqual, ty) -> io (printForUser stdout unqual (ppr ty)) -- 1.7.10.4