Commit cc8e41a3 authored by Duncan Coutts's avatar Duncan Coutts

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.
parent 4f0beafc
......@@ -63,6 +63,21 @@ OK:
<title>Primitive imports</title>
GHC extends the FFI with an additional calling convention
<literal>prim</literal>, e.g.:
foreign import prim "foo" foo :: ByteArray# -> (# Int#, Int# #)
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.
<sect1 id="ffi-ghc">
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment