X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fghci.xml;h=3ba2012eee34a086f7cd4ac1cb7fa227c7f6c1a5;hb=6735097cdbe113e74555a5a748b0648e5ed762b5;hp=a8ebbd7b661b9f21d9d8713a2cbd2dc3284b1cdd;hpb=f17c76a4fc51a52ccda154ec9e4990f13f78c8c2;p=ghc-hetmet.git
diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml
index a8ebbd7..3ba2012 100644
--- a/docs/users_guide/ghci.xml
+++ b/docs/users_guide/ghci.xml
@@ -393,9 +393,9 @@ Prelude>
Show
- The automatic printing of binding results can be supressed with
+ The automatic printing of binding results can be suppressed with
(this does not
- supress printing the result of non-binding statements).
+ suppress printing the result of non-binding statements).
.
You might want to do this to prevent the result of binding
statements from being fully evaluated by the act of printing
@@ -929,6 +929,7 @@ right :: [a]
left:
+[qsort.hs:2:15-46] *Main> :set -fprint-evld-with-show
[qsort.hs:2:15-46] *Main> :print left
left = (_t1::[a])
@@ -948,6 +949,13 @@ left = (_t1::[a])
underscore, in this case
_t1.
+ The flag -fprint-evld-with-show instructs
+ :print to reuse
+ available Show instances when possible. This happens
+ only when the contents of the variable being inspected
+ are completely evaluated.
+
+
If we aren't concerned about preserving the evaluatedness of a
variable, we can use :force instead of
:print. The :force command
@@ -1017,6 +1025,7 @@ right :: [a]
The execution continued at the point it previously stopped, and has
now stopped at the breakpoint for a second time.
+
Setting breakpoints
@@ -1109,8 +1118,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:
@@ -1122,7 +1133,7 @@ _result :: IO ()
The command :step
expr begins the evaluation of
expr in single-stepping mode. If
- expr is ommitted, then it single-steps from
+ expr is omitted, then it single-steps from
the current breakpoint. :stepover
works similarly.
@@ -1333,9 +1344,13 @@ a :: a
:trace and :history to establish
the context. However, head is in a library and
we can't set a breakpoint on it directly. For this reason, GHCi
- provides the flag -fbreak-on-exception which causes
- the evaluator to stop when an exception is thrown, just as it does when
- a breakpoint is hit. This is only really useful in conjunction with
+ provides the flags -fbreak-on-exception which causes
+ the evaluator to stop when an exception is thrown, and
+ -fbreak-on-error, which works similarly but stops only on
+ uncaught exceptions. When stopping at an exception, GHCi will act
+ just as it does when a breakpoint is hit, with the deviation that it
+ will not show you any source code location. Due to this, these
+ commands are only really useful in conjunction with
:trace, in order to log the steps leading up to the
exception. For example:
@@ -1665,17 +1680,20 @@ $ ghci -lm
- :browse*module ...
+ :browse*module ...
:browseDisplays the identifiers defined by the module
module, which must be either
- loaded into GHCi or be a member of a package. If the
- * symbol is placed before the module
- name, then all the identifiers defined
- in module are shown; otherwise
- the list is limited to the exports of
+ loaded into GHCi or be a member of a package. If
+ module is omitted, the most
+ recently-loaded module is used.
+
+ If the * symbol is placed before
+ the module name, then all the
+ identifiers in scope in module are
+ shown; otherwise the list is limited to the exports of
module. The
*-form is only available for modules
which are interpreted; for compiled modules (including
@@ -1742,7 +1760,7 @@ $ ghci -lm
Generates a “tags” file for Vi-style editors
(:ctags) or
Emacs-style editors (:etags). If
- no filename is specified, the defaulit tags or
+ no filename is specified, the default tags or
TAGS is
used, respectively. Tags for all the functions, constructors and
types in the currently loaded modules are created. All modules must