FFI Report, CVS Id 1.4
...is available at http://www.cse.unsw.edu.au/~chak/haskell/ffi.{ps.gz,tex} It contains the results of the discussion on external entities for the C calling conventions. Summary of changes: * Modifiers are at the moment only for import declarations. * import = define variable; export = use variable * Import declarations in ccall have the following form entity - ['static'] [fname] [''] [cid] | 'dynamic' | 'wrapper' where `fname' is the name of a header file that must end in `.h'. If `' prefixes the cid, we import the address of that label. `dynamic' corresponds to the old import dynamic and `wrapper' to the old export dynamic. This has essentially the same functionality as Sven's last posting, but allows to specify a header file without being forced to specify the C identifier. * Appendix B contains a rationale for items about which there has been much discussion. Open question: In foreign import dynamic, the old FFI spec restricted type of dynamically imported functions to prim_args - IO prim_result Why did it forbid thunks and pure functions? Is this really necessary? Cheers, Manuel ___ FFI mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/ffi
Re: Again: FFI syntax
On 01-Jun-2001, Manuel M. T. Chakravarty [EMAIL PROTECTED] wrote: Fergus Henderson [EMAIL PROTECTED] wrote, I would be fine to say that some other name, e.g. `c', means that. But `ccall' already has an existing meaning, and it would be terribly confusing if e.g. MSVC and GNU C used `ccall' to mean one thing, while Haskell used it to mean something different. Are you sure that ccall has a fixed meaning outside of the Haskell community? Oh, sorry, I was mistaken. The name that MSVC and the Windows versions of GNU C use is `cdecl'. Using `ccall' for Haskell should be fine. Sorry for the confusion. -- Fergus Henderson [EMAIL PROTECTED] | I have always known that the pursuit | of excellence is a lethal habit WWW: http://www.cs.mu.oz.au/~fjh | -- the last words of T. S. Garp. ___ FFI mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/ffi