Commit 0855975c authored by Simon Marlow's avatar Simon Marlow
Browse files

add ':show context' which lists the current stack of breakpoint contexts

parent a2d98d07
......@@ -1200,7 +1200,8 @@ showCmd str =
["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
......@@ -1234,6 +1235,13 @@ showBkptTable = do
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment