[MLton] Re: [MLton-user] SVN r6941 MLton/MinGW32 and FFI

Ville Laurikari ville at laurikari.net
Tue Nov 11 22:09:14 PST 2008


> itself it implement them, but not export them. A good example being
> the mingw.{ch} which adds missing functionality as MLton_* (b/c of
> #define's in mingw.h). Several existing files in platform/*.c don't do
> this, which IMO is bad (aix.c, float-math.c, hpux.c, mkdir2.c,
> setenv.putenv.c, and solaris.c).

I'll fix at least aix.h and hpux.h, in some schedule, to #define
prefixed versions.

> Regarding public/private, I can no longer recommend changing the
> default to public. I recall my reasoning now: external is the safe
> default on all platforms except MinGW. On all these other platforms it
> works, and works correctly. If public were the default, it might be
> more convenient for MinGW, but would in some corner cases break
> (variables and pointers). Setting the default to external makes it
> absolutely clear that the code is in error (and dangerous) on MinGW as
> it fails loudly with a link error.

I understand.

At least in our case, backwards compatibility wins.  We don't use the
corner cases, and are not planning to start using them.  We'll
probably then need to use a custom version of MLton (with default as
public on MinWG) on MinWG for a period of time until we've had a
chance to update all live code.  We mostly build our own MLton
binaries anyway, so it's not a huge problem to do this.

--
http://www.iki.fi/vl/



More information about the MLton mailing list