summaryrefslogtreecommitdiff
path: root/docs/users_guide/ffi-chap.rst
diff options
context:
space:
mode:
authorDavid Feuer <david.feuer@gmail.com>2017-05-20 12:56:20 -0400
committerBen Gamari <ben@smart-cactus.org>2017-05-20 16:29:18 -0400
commit5b8f95d7fca302a9ad27533b74b1a1c2364605dc (patch)
treef4d9a51c75ca364b85a58a7137e5dec95dbaa142 /docs/users_guide/ffi-chap.rst
parent86466489a4154d595c408470df68e946a100df88 (diff)
downloadhaskell-5b8f95d7fca302a9ad27533b74b1a1c2364605dc.tar.gz
A few documentation fixes
`MIN_VERSION_pkg` was documented backwards. An important caveat about initializing the Haskell runtime was buried in a footnote. The documentation of `-dynamic` was (even more) confusing. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3582
Diffstat (limited to 'docs/users_guide/ffi-chap.rst')
-rw-r--r--docs/users_guide/ffi-chap.rst11
1 files changed, 4 insertions, 7 deletions
diff --git a/docs/users_guide/ffi-chap.rst b/docs/users_guide/ffi-chap.rst
index d4bf34318d..35557b8c00 100644
--- a/docs/users_guide/ffi-chap.rst
+++ b/docs/users_guide/ffi-chap.rst
@@ -311,8 +311,10 @@ can separate out any arguments for the RTS (i.e. those arguments between
After we've finished invoking our Haskell functions, we can call
``hs_exit()``, which terminates the RTS.
-There can be multiple calls to ``hs_init()``, but each one should be
-matched by one (and only one) call to ``hs_exit()`` [1]_.
+There can be multiple calls to ``hs_init()``, but each one should be matched by
+one (and only one) call to ``hs_exit()``. The outermost ``hs_exit()`` will
+actually de-initialise the system. Note that currently GHC's runtime cannot
+reliably re-initialise after this has happened; see :ref:`infelicities-ffi`.
.. note::
When linking the final program, it is normally easiest to do the
@@ -320,11 +322,6 @@ matched by one (and only one) call to ``hs_exit()`` [1]_.
don't forget the flag :ghc-flag:`-no-hs-main`, otherwise GHC
will try to link to the ``Main`` Haskell module.
-.. [1]
- The outermost ``hs_exit()`` will actually de-initialise the system.
- Note that currently GHC's runtime cannot reliably re-initialise after
- this has happened, see :ref:`infelicities-ffi`.
-
To use ``+RTS`` flags with ``hs_init()``, we have to modify the example
slightly. By default, GHC's RTS will only accept "safe" ``+RTS`` flags
(see :ref:`options-linker`), and the :ghc-flag:`-rtsopts`