summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorZejun Wu <watashi@fb.com>2019-01-30 17:35:50 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-02-03 03:14:03 -0500
commit59d622d7f1a982e5f24bb0eb8e72121d3ef2270c (patch)
treed66245b72c5a9cc3281145fc3a613ab8c20a5764 /docs
parent71dae4eb1a4891fc1a428caf70a06830864ffdc3 (diff)
downloadhaskell-59d622d7f1a982e5f24bb0eb8e72121d3ef2270c.tar.gz
docs: change meta-variable of -interactive-print from expr to name
`-interactive-print` doesn't accept **expr** as `-e` or `:def` does. It must be a qualified or unqualified **name** in scope.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/ghci.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst
index f468e80eb0..05b64f9340 100644
--- a/docs/users_guide/ghci.rst
+++ b/docs/users_guide/ghci.rst
@@ -1181,20 +1181,20 @@ IO ()``, and it works by converting the value to ``String`` using ``show``.
This is not ideal in certain cases, like when the output is long, or
contains strings with non-ascii characters.
-The :ghc-flag:`-interactive-print ⟨expr⟩` flag allows to specify any function
+The :ghc-flag:`-interactive-print ⟨name⟩` flag allows to specify any function
of type ``C a => a -> IO ()``, for some constraint ``C``, as the function for
printing evaluated expressions. The function can reside in any loaded module or
any registered package, but only when it resides in a registered package will
it survive a :ghci-cmd:`:cd`, :ghci-cmd:`:add`, :ghci-cmd:`:load`,
:ghci-cmd:`:reload` or, :ghci-cmd:`:set`.
-.. ghc-flag:: -interactive-print ⟨expr⟩
+.. ghc-flag:: -interactive-print ⟨name⟩
:shortdesc: :ref:`Select the function to use for printing evaluated
expressions in GHCi <ghci-interactive-print>`
:type: dynamic
:category:
- Set the function used by GHCi to print evaluation results. Expression
+ Set the function used by GHCi to print evaluation results. Given name
must be of type ``C a => a -> IO ()``.
As an example, suppose we have following special printing module: ::
@@ -1224,7 +1224,7 @@ will start an interactive session where values with be printed using
A custom pretty printing function can be used, for example, to format
tree-like and nested structures in a more readable way.
-The :ghc-flag:`-interactive-print ⟨expr⟩` flag can also be used when running
+The :ghc-flag:`-interactive-print ⟨name⟩` flag can also be used when running
GHC in ``-e mode``:
.. code-block:: none