[MLton] ffi improvements

Stephen Weeks MLton@mlton.org
Wed, 22 Sep 2004 17:26:07 -0700


> it would allow greater "precision" in imported functions if the
> address could be opaque, the way we allow the other imported types
> to be opaque, so long as they map to CTypes.
...
> So, that's my proposed syntax:
> 
>   _import * : t -> t1 * ... * tn -> tr;

Looks good to me.  The syntax might be OK without the first "*" as
well.

> > 	(_import : t1 -> t2;) (_address "foo";)
> 
> We can view it that way, but I don't suggest implementing it that way.
> The above will necessitate an indirect function call.

Makes sense.