BinIO and TextIO refectored...

Stephen Weeks MLton@sourcelight.com
Mon, 1 Apr 2002 00:11:07 -0800


> I think it's quite ugly to have something like this in the
> compiler so maybe it would be better to throw the main function
> into a separate library to link with the rest of the MLton runtime?

I agree it is nicer to have the four separate main functions defined
in libraries and to link with the appropriate one.  You don't even
need ifdef's in that case.  There are just four different source files
that get compiled.

Henry wrote:
> Why do you need include files to go into MLton and a new main?  Isn't it
> enough to have the ability to link in with foreign libraries and to then
> call them via _ffi?  I.e., wouldn't it be enough to simply have SDL users
> call some sdlStartup function before they did any stuff?  Then there would not
> be any of these horrible #ifdef's or any SDL any thing in MLton code.
> Am I missing something?

This would be even better if you could do this, Anoq.  Is it possible?

> Also, I would still very much like to port to the Mingw32
> compiler - so please tell me when you have a version of
> MLton that I should start modifying :) (or if I should just
> modify the MLton version I use now?)

We hope to do a public release this week.  You can certainly start on
that.  In the meantime, I have asked Henry to put up rpms and a tgz of
our latest internal version (20020331) at

	http://www.sourcelight.com/MLton/EXPERIMENTAL/

It should be there sometime Monday.