X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FInteractiveUI.hs;h=3fbdcbe576bf4c11b8e46331b72b1986cef9d2c7;hb=4c61d9effc9117497cd59a050856c01d8bbf24aa;hp=d6f557dd104b45fa254c92fc0cefc5a37ee17a91;hpb=c78721146b8b2b181e2fccb3a65a366eef85345e;p=ghc-hetmet.git diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index d6f557d..3fbdcbe 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -175,7 +175,7 @@ helpText = " :help, :? display this list of commands\n" ++ " :info [ ...] display information about the given names\n" ++ " :print [ ...] prints a value without forcing its computation\n" ++ - " :sprint [ ...] prints a value without forcing its computation(simpler)\n" ++ + " :sprint [ ...] simplified version of :print\n" ++ " :load ... load module(s) and their dependents\n" ++ " :module [+/-] [*] ... set the context for expression evaluation\n" ++ " :main [ ...] run the main function with the given arguments\n" ++ @@ -1384,11 +1384,13 @@ handler :: Exception -> GHCi Bool handler (DynException dyn) | Just StopChildSession <- fromDynamic dyn -- propagate to the parent session - = ASSERTM (liftM not isTopLevel) >> throwDyn StopChildSession + = do ASSERTM (liftM not isTopLevel) + throwDyn StopChildSession | Just (ChildSessionStopped msg) <- fromDynamic dyn -- Reload modules and display some message - = ASSERTM (isTopLevel) >> io(putStrLn msg) >> return False + = do ASSERTM (isTopLevel) + io(putStrLn msg) >> return False handler exception = do flushInterpBuffers @@ -1517,11 +1519,13 @@ doBreakpoint ref_bkptTable s@(Session ref) values _ locMsg b = do printScopeMsg location ids = do unqual <- GHC.getPrintUnqual s printForUser stdout unqual $ - text "Local bindings in scope:" $$ + text "Stopped at a breakpoint in " <> text (stripColumn location) <> + char '.' <+> text "Local bindings in scope:" $$ nest 2 (pprWithCommas showId ids) where showId id = ppr (idName id) <+> dcolon <+> ppr (idType id) + stripColumn = reverse . tail . dropWhile (/= ':') . reverse -- | Give the Id a Global Name, and tidy its type globaliseAndTidy :: Id -> Id