Summary of current change suggestions

Simon Marlow simonmar at microsoft.com
Thu Feb 22 07:08:22 EST 2001


>   foreign import ccall "<gtk/gtk.h>:gtk_window_new" 
>     windowNew :: CInt -> IO (Ptr Window)
> 
> If the <.> are omitted in the include specification, it
> corresponds to an #include"...".

Don't forget you might need multiple includes, eg. <sys/types.h> &
<sys/socket.h> for socket(), and ordering is important.  Multiple
includes could be separated by commas.

I agree that adding the include spec to the foreign import declaration
is a good idea because of the cross-module inlining issue (I'd forgotten
about that).

Marcin: I guess hsc2hs should have some magic to insert the include
specs automatically :)

Cheers,
	Simon




More information about the FFI mailing list