X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fghci.xml;h=69078d5093ebb2e0489bf0d06d74a7f16594cdc1;hb=d62101efb9e263173b69fb89c07f03dcf805e81f;hp=82ee33054d6bdbeda1f1b04cc26730a7abfac83f;hpb=8fcfc8d6e42ea5bf49422024bc71d3728ee97db9;p=ghc-hetmet.git
diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml
index 82ee330..69078d5 100644
--- a/docs/users_guide/ghci.xml
+++ b/docs/users_guide/ghci.xml
@@ -1109,8 +1109,10 @@ right :: [a]
bug. GHCi offers two variants of stepping. Use
:step to enable all the
breakpoints in the program, and execute until the next breakpoint is
- reached. Use :stepover to step over function
- applications, which of course are executed all the same.
+ reached. Use :steplocal to limit the set
+ of enabled breakpoints to those in the current top level function.
+ Similarly, use :stepmodule to single step only on
+ breakpoints contained in the current module.
For example:
@@ -1125,48 +1127,9 @@ _result :: IO ()
expr is ommitted, then it single-steps from
the current breakpoint. :stepover
works similarly.
-
- In the current version of the debugger, :stepover
- is limited to work locally in the lexical sense, that is in the context
- of the current expression body.
- When you run to the end of the expression, :stepover
- stops working and switches to behave like regular :step.
- This means
- that it will fail to step over the last function application. As a result,
- currently :stepover works great for monadic code, but
- interacts less perfectly with pure code. For example, if stopped at the
- line 2, on the entire expression
- qsort left ++ [a] ++ qsort right:
-
-... [qsort2.hs:2:15-46] *Main> :step
-Stopped at qsort2.hs:2:15-46
-
-... [qsort2.hs:2:15-46] *Main> :list
-2 qsort (a:as) = qsort left ++ [a] ++ qsort right
-
-
- The first :stepover will step over the first
- qsort recursive call, as expected. The second one
- will step over the evaluation of [a], again as
- expected. However, the third one has lexically run out
- of the current expression, and will behave like regular
- :step, performing one step of lazy evaluation and
- stopping at the next breakpoint. In this case it is indeed the second
- recursive application of qsort.
-
-[qsort2.hs:2:36-46] *Main> :stepover
-Warning: no more breakpoints in this function body, switching to :step
-Stopped at qsort2.hs:(1,0)-(3,55)
-
-[qsort2.hs:2:36-46] *Main> :list
-_result :: [a]
-1 qsort [] = []
-2 qsort (a:as) = qsort left ++ [a] ++ qsort right
-3 where (left,right) = (filter (<=a) as, filter (>a) as)
-
+
The :list command is particularly useful when
- single-stepping, to see where you currently are, as just shown
- in the above example.
+ single-stepping, to see where you currently are:
[qsort.hs:5:7-47] *Main> :list
@@ -1528,10 +1491,6 @@ Just 20
CAF (e.g. main), stop at a breakpoint, and ask for the value of the
CAF at the prompt again.
- :stepover only works lexically locally, in the
- body of the current expression. As a result, it can be rather impredictable
- when used in pure functional code, as opposed to monadic code.
-
Implicit parameters (see ) are only available
at the scope of a breakpoint if there is an explicit type signature.