X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fffi-chap.xml;h=e1374c461054f54a2d2b9f085d8ae92cda03101c;hb=28a464a75e14cece5db40f2765a29348273ff2d2;hp=a6dccb3baf2f44511870672fa9428ab79d6e4c5b;hpb=df87e59ebe63776ef33b2587b50930baf9614931;p=ghc-hetmet.git diff --git a/ghc/docs/users_guide/ffi-chap.xml b/ghc/docs/users_guide/ffi-chap.xml index a6dccb3..e1374c4 100644 --- a/ghc/docs/users_guide/ffi-chap.xml +++ b/ghc/docs/users_guide/ffi-chap.xml @@ -2,13 +2,20 @@ -Foreign function interface (FFI) + +Foreign function interface (FFI) + GHC (mostly) conforms to the Haskell 98 Foreign Function Interface - Addendum 1.0, whose definition is available from http://haskell.org/. - The FFI support in GHC diverges from the Addendum in the following ways: - + Addendum 1.0, whose definition is available from http://haskell.org/. + + To enable FFI support in GHC, give the + flag, or +the + flag which implies +. + + The FFI support in GHC diverges from the Addendum in the following ways: @@ -18,8 +25,7 @@ GHC implements a number of GHC-specific extensions to the FFI - Addendum. These extensions are described in , but please note that programs using + Addendum. These extensions are described in , but please note that programs using these features are not portable. Hence, these features should be avoided where possible. @@ -101,6 +107,11 @@ extern HsInt foo(HsInt a0); invoke foo() from C, just #include "Foo_stub.h" and call foo(). + The foo_stub.c and + foo_stub.h files can be redirected using the + option; see . + Using your own <literal>main()</literal>