[MLton] Some issues with MLton on MinGW

Vesa Karvonen vesa.karvonen at cs.helsinki.fi
Sat Mar 3 06:34:40 PST 2007


Quoting David Hansel <hansel at reactive-systems.com>:
[...]
> - When trying to compile MLton on MinGW,  I ran into the following
>   error:
> 
>   Error: ..\lib\mlton\basic\vector.sml 10.29.
>    Variable type in structure disagrees with argument signature.
>      variable: unfoldi
>      structure: _ -> [ 'a t ]
>      signature: _ -> [ 'a t  * 'b ]
[...]

In case anyone else runs into this, I recently compiled a MLton snapshot
on MinGW and the binary is available from the TemporaryUpload page:

  http://mlton.org/pages/TemporaryUpload/attachments/mlton-5112-1.no-docs.i386-mingw.tgz

Hmm... I probably should have uploaded it to the Experimental page.

Anyway, using the snapshot it should be possible to compile MLton from SVN
without problems.

> - The program I am trying to compile is rather large.  During
>   compilation (on Linux nad MinGW) I ran into the following errors:
>   "numPeeks overflow" and "numLinks overflow".
>   I was able to work around these by commenting out the lines in
>   lib/mlton/basic/property-list.fun that increase the numPeeks and
>   numLinks values (a suggestion by Stephen Weeks)

Those counters only seem to be used to get some statistics on the use of
property lists.  Perhaps it would make sense to switch them to use
Int64.int, because overflowing a 64-bit counter would take a lot of time
and a 64-bit counter is likely to be significantly faster than an
arbitrary precision counter.  Also, my guess is that having the overflow
check specifically at 2G would mainly be useful in case of some particular
compiler bugs.  I went ahead and made the change:

  http://mlton.org/pipermail/mlton-commit/2007-March/001387.html

> - OS.Process.wait (on MinGW) is off by a factor of 1000,  i.e.
>   OS.Process.wait (Time.fromMilliseconds 10) will wait 10 seconds.

I committed a fix for this a few hours ago:

  http://mlton.org/pipermail/mlton-commit/2007-March/001386.html

-Vesa Karvonen



More information about the MLton mailing list