calling SML from C

Stephen Weeks MLton@sourcelight.com
Thu, 16 Aug 2001 07:41:52 -0700


> thanks a lot for your help!

You're welcome.

> On the first glance, it looks much easier than I thought it would be. Now,
> it could take a while, before I can really start commenting - you know how
> it runs in the industry: sell first, make later. Apart from some small tests
> it will take time to start with a bigger project.
> 
> Thanks again for your help (and for MLton of course).

FYI, Matthew Fluet (another MLton developer) and I discussed just last night the
modifications needed to call SML from C and it looks promising.  The interface
we are thinking of would require a special command-line switch like

	-export 'foo bar F.f G.g'

which takes a list of (first order) ML functions to be exported to C.  From
this, MLton should be able to automatically generate all of the C stubs and the
SML dispatch that I sent in my previous mail.

No promises, but maybe we'll be able to get it working in September.  We'll
announce a release (or at least an experimental version) when we have something.