Generating Function Prototypes
Ashley Yakeley
ashley at semantic.org
Thu Jul 4 07:15:52 EDT 2002
At 2002-07-04 03:55, Alastair Reid wrote:
>I still think we're better off removing header files completely and
>having the Haskell type completely determine the calling convention
>employed.
I agree. The Haskell compiler doesn't necessarily need to spit out its
own prototypes for the benefit of the C code, but it should be able to
compile Haskell without needing the header files. In particular, if I
specify this:
foreign import ccall "swapHalves" swapHalves :: Int64 -> IO Int64;
...the Haskell compiler ought to call the function as if it returns a
"long long" (or other 64-bit signed integer type).
--
Ashley Yakeley, Seattle WA
More information about the FFI
mailing list