diff options
author | David Feuer <david.feuer@gmail.com> | 2017-05-20 12:56:20 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-05-20 16:29:18 -0400 |
commit | 5b8f95d7fca302a9ad27533b74b1a1c2364605dc (patch) | |
tree | f4d9a51c75ca364b85a58a7137e5dec95dbaa142 /docs/users_guide/ffi-chap.rst | |
parent | 86466489a4154d595c408470df68e946a100df88 (diff) | |
download | haskell-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.rst | 11 |
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` |