Fix some text in the GHCi help message that was going over 80 columns
[ghc-hetmet.git] / compiler / ghci / InteractiveUI.hs
index d6f557d..3fbdcbe 100644 (file)
@@ -175,7 +175,7 @@ helpText =
  "   :help, :?                   display this list of commands\n" ++
  "   :info [<name> ...]          display information about the given names\n" ++
  "   :print [<name> ...]         prints a value without forcing its computation\n" ++
- "   :sprint [<name> ...]        prints a value without forcing its computation(simpler)\n" ++
+ "   :sprint [<name> ...]        simplified version of :print\n" ++
  "   :load <filename> ...        load module(s) and their dependents\n" ++
  "   :module [+/-] [*]<mod> ...  set the context for expression evaluation\n" ++
  "   :main [<arguments> ...]     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