From 9c9e716300335d9877227e06b24235bba68787a1 Mon Sep 17 00:00:00 2001 From: Judah Jacobson Date: Wed, 24 Sep 2008 21:24:22 +0000 Subject: [PATCH] Don't exit ghci if :info is called on an undefined identifier. --- compiler/ghci/InteractiveUI.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index a16a5b9..5c94597 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -863,7 +863,8 @@ help _ = io (putStr helpText) info :: String -> GHCi () info "" = ghcError (CmdLineError "syntax: ':i '") -info s = do { let names = words s +info s = handleSourceError GHC.printExceptionAndWarnings $ do + { let names = words s ; dflags <- getDynFlags ; let pefas = dopt Opt_PrintExplicitForalls dflags ; mapM_ (infoThing pefas) names } -- 1.7.10.4