diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-07-05 15:01:47 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-07-11 13:39:50 -0400 |
commit | 31ceaba3edac536d8a8d97d49bb797d4f5bedac6 (patch) | |
tree | 98798be8d10ff604caadecf0612d48f8607cedde /docs | |
parent | 4f6901334c3ced4ecc0c211f4c2ba5f56db9eab5 (diff) | |
download | haskell-31ceaba3edac536d8a8d97d49bb797d4f5bedac6.tar.gz |
user-guide: Various fixes to FFI section
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/ffi-chap.rst | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/users_guide/ffi-chap.rst b/docs/users_guide/ffi-chap.rst index bd5ca3d401..684435cfcc 100644 --- a/docs/users_guide/ffi-chap.rst +++ b/docs/users_guide/ffi-chap.rst @@ -15,16 +15,16 @@ definition is part of the Haskell Report on FFI support is enabled by default, but can be enabled or disabled explicitly with the :ghc-flag:`-XForeignFunctionInterface` flag. -GHC implements a number of GHC-specific extensions to the FFI Addendum. -These extensions are described in :ref:`ffi-ghcexts`, but please note -that programs using these features are not portable. Hence, these +GHC implements a number of GHC-specific extensions to the FFI Chapter of the +Haskell 2010 Report. These extensions are described in :ref:`ffi-ghcexts`, but +please note that programs using these features are not portable. Hence, these features should be avoided where possible. The FFI libraries are documented in the accompanying library documentation; see for example the :base-ref:`Foreign <Foreign.html>` module. -GHC differences to the FFI Addendum ------------------------------------ +GHC differences to the FFI Chapter +---------------------------------- Guaranteed call safety ~~~~~~~~~~~~~~~~~~~~~~ @@ -41,7 +41,7 @@ otherwise-unnecessary copy. However, this can only be done safely under collector in the middle of the call. In previous releases, GHC would take advantage of the freedom afforded by the -Addendum by performing ``safe`` foreign calls in place of ``unsafe`` calls in +Chapter by performing ``safe`` foreign calls in place of ``unsafe`` calls in the bytecode interpreter. This meant that some packages which worked when compiled would fail under GHCi (e.g. :ghc-ticket:`13730`). @@ -52,8 +52,8 @@ bytecode interpreter. .. _ffi-ghcexts: -GHC extensions to the FFI Addendum ----------------------------------- +GHC extensions to the FFI Chapter +--------------------------------- The FFI features that are described in this section are specific to GHC. Your code will not be portable to other compilers if you use them. @@ -62,7 +62,7 @@ Unboxed types ~~~~~~~~~~~~~ The following unboxed types may be used as basic foreign types (see FFI -Addendum, Section 3.2): ``Int#``, ``Word#``, ``Char#``, ``Float#``, +Chapter, Section 8.6): ``Int#``, ``Word#``, ``Char#``, ``Float#``, ``Double#``, ``Addr#``, ``StablePtr# a``, ``MutableByteArray#``, ``ForeignObj#``, and ``ByteArray#``. |