diff options
author | Judah Jacobson <judah.jacobson@gmail.com> | 2008-09-24 21:24:22 +0000 |
---|---|---|
committer | Judah Jacobson <judah.jacobson@gmail.com> | 2008-09-24 21:24:22 +0000 |
commit | 9c9e716300335d9877227e06b24235bba68787a1 (patch) | |
tree | b97bcc1610b80ce2b309dee7220e344b90b692c5 /compiler/ghci/InteractiveUI.hs | |
parent | ed1cc5d8a193151d6733fb146986ebf23597fda0 (diff) | |
download | haskell-9c9e716300335d9877227e06b24235bba68787a1.tar.gz |
Don't exit ghci if :info is called on an undefined identifier.
Diffstat (limited to 'compiler/ghci/InteractiveUI.hs')
-rw-r--r-- | compiler/ghci/InteractiveUI.hs | 3 |
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 } |