More informative message in a breakpoint
authorPepe Iborra <mnislaih@gmail.com>
Sat, 6 Jan 2007 10:07:36 +0000 (10:07 +0000)
committerPepe Iborra <mnislaih@gmail.com>
Sat, 6 Jan 2007 10:07:36 +0000 (10:07 +0000)
compiler/ghci/InteractiveUI.hs

index d6f557d..d18a75c 100644 (file)
@@ -1517,11 +1517,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