From: simonmar Date: Wed, 28 Mar 2001 10:34:15 +0000 (+0000) Subject: [project @ 2001-03-28 10:34:15 by simonmar] X-Git-Tag: Approximately_9120_patches~2279 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f65a77e8c8de24a58e2c8461622a949f18eb0fb3;p=ghc-hetmet.git [project @ 2001-03-28 10:34:15 by simonmar] Document the use of :set with command-line options a little better. --- diff --git a/ghc/docs/users_guide/ghci.sgml b/ghc/docs/users_guide/ghci.sgml index 8e4836e..ce05983 100644 --- a/ghc/docs/users_guide/ghci.sgml +++ b/ghc/docs/users_guide/ghci.sgml @@ -798,67 +798,96 @@ Prelude> :def make (\_ -> return ":! ghc --make Main") The :set command sets two types of options: GHCi options, which begin with ‘+” and “command-line” - options, which begin with ‘-’. Either type of option - may be set using :set and unset using - :unset. + options, which begin with ‘-’. - The available GHCi options are: + + GHCi options + optionsGHCi + - - - +r - +r - CAFsin GHCi - Constant Applicative FormCAFs - - Normally, any evaluation of top-level expressions - (otherwise known as CAFs or Constant Applicative Forms) in - loaded modules is retained between evaluations. Turning on - +r causes all evaluation of top-level - expressions to be discarded after each evaluation (they are - still retained during a single - evaluation). + GHCi options may be set using :set and + unset using :unset. + + The available GHCi options are: + + + + +r + +r + CAFsin GHCi + Constant Applicative FormCAFs + + Normally, any evaluation of top-level expressions + (otherwise known as CAFs or Constant Applicative Forms) in + loaded modules is retained between evaluations. Turning + on +r causes all evaluation of + top-level expressions to be discarded after each + evaluation (they are still retained + during a single evaluation). - This option may help if the evaluated top-level - expressions are consuming large amounts of space, or if you - need repeatable performance measurements. - - + This option may help if the evaluated top-level + expressions are consuming large amounts of space, or if + you need repeatable performance measurements. + + + + + +s + +s + + Display some stats after evaluating each expression, + including the elapsed time and number of bytes allocated. + NOTE: the allocation figure is only accurate to the size + of the storage manager's allocation area, because it is + calculated at every GC. Hence, you might see values of + zero if no GC has occurred. + + + + + +t + +t + + Display the type of each variable bound after a + statement is entered at the prompt. If the statement is a + single expression, then the only variable binding will be + for the variable + ‘it’. + + + + - - +s - +s - - Display some stats after evaluating each expression, - including the elapsed time and number of bytes allocated. - NOTE: the allocation figure is only accurate to the size of - the storage manager's allocation area, because it is - calculated at every GC. Hence, you might see values of zero - if no GC has occurred. - - + + Setting GHC command-line options in GHCi - - +t - +t - - Display the type of each variable bound after a - statement is entered at the prompt. If the statement is a - single expression, then the only variable binding will be - for the variable ‘it’. - - - + Normal GHC command-line options may also be set using + :set. For example, to turn on + , you would say: - In addition, any normal GHC command-line option that is - designated as dynamic (see the table in - ), may be set using - :set. Certain static options - (, , and - in particular) will also work, but may not take effect until the - next reload. - dynamicoptions - staticoptions + +Prelude> :set -fglasgow-exts + + + Any GHC command-line option that is designated as + dynamic (see the table in ), may be set using + :set. To unset an option, you can set the + reverse option: + dynamicoptions + + +Prelude> :set -fno-glasgow-exts + + + lists the reverse for each + option where applicable. + + Certain static options (, + , and in particular) will + also work, but may not take effect until the next reload. + staticoptions +