FFI, safe vs unsafe

Simon Marlow simonmar at microsoft.com
Tue Apr 11 04:13:00 EDT 2006


What are the conclusions of this thread?

I think, but correct me if I'm wrong, that the eventual outcome was:

 - concurrent reentrant should be supported, because it is not 
   significantly more difficult to implement than just concurrent.

 - the different varieties of foreign call should all be identifiable,
   because there are efficiency gains to be had in some implementations.

 - the default should be... concurrent reentrant, presumably, because
   that is the safest.  (so we need to invert the notation).

So, can I go ahead and update the wiki?  I'll try to record the
rationale from the discussion too.

I'd like to pull out something from the discussion that got a bit lost
in the swamp: the primary use case we have for concurrent reentrant is
for calling the main loop of a GUI library.  The main loop usually never
returns (at least, not until the application exits), hence concurrent,
and it needs to invoke callbacks, hence reentrant.

Cheers,
	Simon


More information about the Haskell-prime mailing list