Changes between Version 14 and Version 15 of ForeignFunctionInterface


Ignore:
Timestamp:
Oct 9, 2009 11:22:51 AM (5 years ago)
Author:
chak@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ForeignFunctionInterface

    v14 v15  
    7474== Topics that need discussion for the integration into Haskell' == 
    7575 
    76 === Include files === 
    77  
    78 Foreign imports may specify a single include file. This is sufficient in theory, but most GHC users prefer to use `-#include` options instead, and the standard form is poorly supported by GHC. The hierarchical libraries use an `INCLUDE` pragma as a portable replacement for `OPTIONS_GHC -#include`. jhc lazily collects the imports needed and only includes the ones needed by the FFI functions used after optimizations. this means you can have FFI calls refering to libraries and includes that are not on a system and still compile the program if none of the routines are used.  
    79  
    80  The rationale behind the design in the addendum is that for cases where a single include files does not suffice, you can always write your own include file that does something more clever (and include that from Haskell).  Include files can be used in so many different ways that any other solution, while covering some more complex uses, will never cover them all, which will force people into the fallback of providing extra include files anyway. 
    81  
    82   -- ManuelChakravarty 
    8376 
    8477=== `ccall` vs. `stdcall` ===