Better document :stepover and its limitations
[ghc-hetmet.git] / docs / users_guide / ghci.xml
index 7a3c77a..a8ebbd7 100644 (file)
@@ -1106,10 +1106,12 @@ right :: [a]
 
       <para>Single-stepping is a great way to visualise the execution of your
         program, and it is also a useful tool for identifying the source of a
-        bug.  The concept is simple: single-stepping enables all the
-        breakpoints in the program and executes until the next breakpoint is
-        reached, at which point you can single-step again, or continue
-        normally.  For example:</para>
+        bug. GHCi offers two variants of stepping. Use 
+       <literal>:step</literal>  to enable all the
+        breakpoints in the program, and execute until the next breakpoint is
+        reached. Use <literal>:stepover</literal> to step over function
+       applications, which of course are executed all the same. 
+       For example:</para>
 
 <screen>
 *Main> :step main
@@ -1118,10 +1120,11 @@ _result :: IO ()
 </screen>
 
       <para>The command <literal>:step
-          <replaceable>expr</replaceable></literal> begins the evaluation of
+        <replaceable>expr</replaceable></literal> begins the evaluation of
         <replaceable>expr</replaceable> in single-stepping mode.  If
         <replaceable>expr</replaceable> is ommitted, then it single-steps from
-        the current breakpoint.</para>
+        the current breakpoint. <literal>:stepover</literal> 
+        works similarly.</para>
 
       <para>The <literal>:list</literal> command is particularly useful when
         single-stepping, to see where you currently are:</para>
@@ -1925,7 +1928,7 @@ Prelude> :. cmds.ghci
          the location of its definition in the source.</para>
          <para>For types and classes, GHCi also summarises instances that
          mention them.  To avoid showing irrelevant information, an instance
-         is shown only if (a) its head mentions <relaceable>name</replaceable>, 
+         is shown only if (a) its head mentions <replaceable>name</replaceable>, 
          and (b) all the other things mentioned in the instance
          are in scope (either qualified or otherwise) as a result of 
          a <literal>:load</literal> or <literal>:module</literal> commands. </para>