diff options
Diffstat (limited to 'docs/users_guide/ghci.rst')
-rw-r--r-- | docs/users_guide/ghci.rst | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst index ac9f33f362..5ffe323f5f 100644 --- a/docs/users_guide/ghci.rst +++ b/docs/users_guide/ghci.rst @@ -2347,10 +2347,14 @@ commonly used commands. ghci> :complete repl 5-10 "map" 0 3 "" -.. ghci-cmd:: :continue +.. ghci-cmd:: :continue; [⟨ignoreCount⟩] Continue the current evaluation, when stopped at a breakpoint. + If an ``⟨ignoreCount⟩`` is specified, the program will ignore + the current breakpoint for the next ``⟨ignoreCount⟩`` iterations. + See command :ghci-cmd:`:ignore`. + .. ghci-cmd:: :ctags; [⟨filename⟩] Generates a "tags" file for Vi-style editors (:ghci-cmd:`:ctags`) or @@ -2459,7 +2463,8 @@ commonly used commands. Enable one or more disabled breakpoints by number (use :ghci-cmd:`:show breaks` to see the number and state of each breakpoint). The ``*`` form enables all the - disabled breakpoints. + disabled breakpoints. Enabling a break point will reset its ``ignore count`` + to 0. (See :ghci-cmd:`:ignore`) .. ghci-cmd:: :etags @@ -2577,6 +2582,20 @@ commonly used commands. current module if omitted). This includes the trust type of the module and its containing package. +.. ghci-cmd:: :ignore; ⟨break⟩ ⟨ignoreCount⟩ + + Set the ignore count of the breakpoint with number ``⟨break⟩`` to + ``⟨ignoreCount⟩``. + + The next ``⟨ignoreCount⟩`` times the program hits the breakpoint + ``⟨break⟩``, this breakpoint is ignored and the program doesn't + stop. Every time the breakpoint is ignored, the ``ignore count`` + is decremented by 1. When the ``ignore count`` is zero, the program + again stops at the break point. + + You can also specify an ``⟨ignoreCount⟩`` on a :ghci-cmd:`:continue` + command when you resume execution of your program. + .. ghci-cmd:: :kind;[!] ⟨type⟩ Infers and prints the kind of ⟨type⟩. The latter can be an arbitrary @@ -2866,8 +2885,9 @@ commonly used commands. *ghci> :def cond \expr -> return (":cmd if (" ++ expr ++ ") then return \"\" else return \":continue\"") *ghci> :set stop 0 :cond (x < 3) - Ignoring breakpoints for a specified number of iterations is also - possible using similar techniques. + To ignore breakpoints for a specified number of iterations use + the :ghci-cmd:`:ignore` or the ``⟨ignoreCount⟩`` parameter of the + :ghci-cmd:`:continue` command. .. ghci-cmd:: :seti; [⟨option⟩ ...] |