diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-06-01 09:46:20 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-06-01 09:46:20 -0700 |
commit | 98b0b2e41f2bdc66bf815ff5f3825832b2b6d34d (patch) | |
tree | b88b6e1277bae56d43b93f54d2cabdfc81ddc1d0 | |
parent | 931268a2dfea91b4114cba87bc36fc93428ed144 (diff) | |
download | haskell-98b0b2e41f2bdc66bf815ff5f3825832b2b6d34d.tar.gz |
Add information about allowed foreign prim args, see #10460.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
-rw-r--r-- | docs/users_guide/ffi-chap.xml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/users_guide/ffi-chap.xml b/docs/users_guide/ffi-chap.xml index acd6f72f7c..0f9cfba483 100644 --- a/docs/users_guide/ffi-chap.xml +++ b/docs/users_guide/ffi-chap.xml @@ -73,7 +73,13 @@ OK: 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 + internal GHC calling convention. The arguments and results must + be unboxed types, except that an argument may be of type + <literal>Any</literal> (by way of <literal>unsafeCoerce#</literal>) + and the result type is allowed to be an unboxed tuple + </para> + <para> + This feature is not intended for use outside of the core libraries that come with GHC. For more details see the <ulink linkend="http://ghc.haskell.org/trac/ghc/wiki/Commentary/PrimOps"> GHC developer wiki</ulink>. |