projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a2d98d0
)
add ':show context' which lists the current stack of breakpoint contexts
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 18 Apr 2007 13:38:56 +0000
(13:38 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 18 Apr 2007 13:38:56 +0000
(13:38 +0000)
compiler/ghci/InteractiveUI.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/InteractiveUI.hs
b/compiler/ghci/InteractiveUI.hs
index
c83e4df
..
ddd6a13
100644
(file)
--- a/
compiler/ghci/InteractiveUI.hs
+++ b/
compiler/ghci/InteractiveUI.hs
@@
-1200,7
+1200,8
@@
showCmd str =
["bindings"] -> showBindings
["linker"] -> io showLinkerState
["breaks"] -> showBkptTable
["bindings"] -> showBindings
["linker"] -> io showLinkerState
["breaks"] -> showBkptTable
- _ -> throwDyn (CmdLineError "syntax: :show [modules|bindings]")
+ ["context"] -> showContext
+ _ -> throwDyn (CmdLineError "syntax: :show [modules|bindings|breaks]")
showModules = do
session <- getSession
showModules = do
session <- getSession
@@
-1234,6
+1235,13
@@
showBkptTable = do
activeBreaks <- getActiveBreakPoints
printForUser $ ppr activeBreaks
activeBreaks <- getActiveBreakPoints
printForUser $ ppr activeBreaks
+showContext :: GHCi ()
+showContext = do
+ st <- getGHCiState
+ printForUser $ vcat (map pp_resume (resume st))
+ where
+ pp_resume (span, _, _) = ptext SLIT("Stopped at") <+> ppr span
+
-- -----------------------------------------------------------------------------
-- Completion
-- -----------------------------------------------------------------------------
-- Completion