diff options
| author | Duncan Coutts <duncan@well-typed.com> | 2009-07-04 18:05:47 +0000 |
|---|---|---|
| committer | Duncan Coutts <duncan@well-typed.com> | 2009-07-04 18:05:47 +0000 |
| commit | cc8e41a3c5e05a1076254ab39a56074e70f9e863 (patch) | |
| tree | 189b76f099f6752c2af0f66f6b9a451372ef0926 /docs/users_guide/ffi-chap.xml | |
| parent | 4f0beafc3f848566938276dffc728ff5d3cfbdf3 (diff) | |
| download | haskell-cc8e41a3c5e05a1076254ab39a56074e70f9e863.tar.gz | |
Document foreign import prim in the user guide
Basically just stat that it exists and refer to the ghc dev wiki
for the details, because we don't really want people using it.
Diffstat (limited to 'docs/users_guide/ffi-chap.xml')
| -rw-r--r-- | docs/users_guide/ffi-chap.xml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/users_guide/ffi-chap.xml b/docs/users_guide/ffi-chap.xml index 7e2c547d27..2d2c5a0531 100644 --- a/docs/users_guide/ffi-chap.xml +++ b/docs/users_guide/ffi-chap.xml @@ -63,6 +63,21 @@ OK: </programlisting> </para> </sect2> + + <sect2> + <title>Primitive imports</title> + <para> + GHC extends the FFI with an additional calling convention + <literal>prim</literal>, e.g.: +<programlisting> + foreign import prim "foo" foo :: ByteArray# -> (# Int#, Int# #) +</programlisting> + This is used to import functions written in Cmm code that follow an + internal GHC calling convention. This feature is not intended for + use outside of the core libraries that come with GHC. For more + details see the GHC developer wiki. + </para> + </sect2> </sect1> <sect1 id="ffi-ghc"> |
