FFI progress
Simon Peyton-Jones
simonpj at microsoft.com
Fri Mar 23 04:06:16 EST 2001
Manuel
The FFI discussion seems to be completely stalled. Would you,
as our Tsar, like to summarise the state of play, and re-invigorate it?
We don't have a plan at the moment; nor do we have even a draft FFI
document (the one you are going to write!). I'm concerned that
we'll just dribble on and lose morale.
Simon
Here's my contribution to re-invigoration:
As I recall the main sticking point is whether we have a global
'foreign library' declaration in addition to foreign import etc.
The main (only?) motivation for such a thing is
C
It's a powerful motivation because C is ubiquitous. I do have
one suggestion to elaborate our earlier proposal. To remind you
our simple-minded proposal was
* no 'foreign library' decl
* the c-language-specific string on a foreign import could say
foreign import "gtk:foo" foo :: <type>
with 'gtk' indicating which foreign package was indicated
Main complaint was: the package-name => what-to-do mapping still isn't
specified. In short, our simple-minded proposal is too simple-minded to
be useful.
OK so the new suggestion is this: the 'gtk' indicates 'please #include
gtk.h'.
It's up to you to have a 'gtk.h' lying around, in which you can put all
the
other #includes (including whether in <> brackets or "" quotes) to your
heart's content.
I bet this still doesn't solve the problem entirely, but maybe it solves
enough
of the problem. I remain reluctant to generate elaborate designs for a
single
language.
Simon
More information about the FFI
mailing list