summaryrefslogtreecommitdiff
path: root/compiler/ghci
diff options
context:
space:
mode:
authorJudah Jacobson <judah.jacobson@gmail.com>2008-09-24 21:24:22 +0000
committerJudah Jacobson <judah.jacobson@gmail.com>2008-09-24 21:24:22 +0000
commit9c9e716300335d9877227e06b24235bba68787a1 (patch)
treeb97bcc1610b80ce2b309dee7220e344b90b692c5 /compiler/ghci
parented1cc5d8a193151d6733fb146986ebf23597fda0 (diff)
downloadhaskell-9c9e716300335d9877227e06b24235bba68787a1.tar.gz
Don't exit ghci if :info is called on an undefined identifier.
Diffstat (limited to 'compiler/ghci')
-rw-r--r--compiler/ghci/InteractiveUI.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs
index a16a5b9a7a..5c94597471 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 <thing-you-want-info-about>'")
-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 }