22 Feb
2001
22 Feb
'01
8:08 p.m.
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