X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fghci.xml;h=3ba2012eee34a086f7cd4ac1cb7fa227c7f6c1a5;hb=6735097cdbe113e74555a5a748b0648e5ed762b5;hp=b1e36ec8403f63bcddf218e3368537ea028e3ba6;hpb=1a38a09d1077b507a0a4e1ebba8e1b51bd5fede9;p=ghc-hetmet.git diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml index b1e36ec..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 @@ -1124,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. @@ -1671,17 +1680,20 @@ $ ghci -lm - :browse *module ... + :browse *module ... :browse Displays 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 @@ -1748,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