[commit: ghc] master: Add information about allowed foreign prim args, see #10460. (98b0b2e)

git at git.haskell.org git at git.haskell.org
Mon Jun 1 16:46:16 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/98b0b2e41f2bdc66bf815ff5f3825832b2b6d34d/ghc

>---------------------------------------------------------------

commit 98b0b2e41f2bdc66bf815ff5f3825832b2b6d34d
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Mon Jun 1 09:46:20 2015 -0700

    Add information about allowed foreign prim args, see #10460.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


>---------------------------------------------------------------

98b0b2e41f2bdc66bf815ff5f3825832b2b6d34d
 docs/users_guide/ffi-chap.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/users_guide/ffi-chap.xml b/docs/users_guide/ffi-chap.xml
index acd6f72..0f9cfba 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>.



More information about the ghc-commits mailing list