diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2018-01-15 13:51:38 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-01-15 13:53:46 -0500 |
commit | 41afbb3f20f3d84abacb37afcc5aa64b24c22da8 (patch) | |
tree | dafe640432f261442f596bf05e01b88e9ee51b80 /docs/users_guide/ghci.rst | |
parent | 2feed118413944cae8a4eed17365f40521f470db (diff) | |
download | haskell-41afbb3f20f3d84abacb37afcc5aa64b24c22da8.tar.gz |
Add flag -fno-it
This flag stops ghci creating the special variable `it`
after evaluating an expression. This stops ghci leaking
as much memory when evaluating expressions. See #14336
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14336
Differential Revision: https://phabricator.haskell.org/D4299
Diffstat (limited to 'docs/users_guide/ghci.rst')
-rw-r--r-- | docs/users_guide/ghci.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst index eae98f7936..f5dcfe3962 100644 --- a/docs/users_guide/ghci.rst +++ b/docs/users_guide/ghci.rst @@ -1027,6 +1027,20 @@ The corresponding translation for an IO-typed ``e`` is Note that ``it`` is shadowed by the new value each time you evaluate a new expression, and the old value of ``it`` is lost. +In order to stop the value ``it`` being bound on each command, the flag +:ghc-flag:`-fno-it` can be set. The ``it`` variable can be the source +of space leaks due to how shadowed declarations are handled by +GHCi (see :ref:`ghci-decls`). + +.. ghc-flag:: -fno-it + :shortdesc: No longer set the special variable ``it``. + :type: dynamic + :reverse: -fno-no-it + :category: + + When this flag is set, the variable ``it`` will no longer be set + to the result of the previously evaluated expression. + .. _extended-default-rules: Type defaulting in GHCi |