[MLton] Broken CVS

Matthew Fluet fluet@cs.cornell.edu
Wed, 15 Dec 2004 12:58:18 -0500 (EST)

> > Right now in CVS a build will fail with:
> ...
> > Error: cannot upgrade basis because the compiler doesn't work
> > make[4]: *** [upgrade-basis.sml] Error 1
> I just did a clean bootstrap from the CVS without problems.  I believe
> you encountered the problem you did because the primitive types have
> changed recently (for the Unicode support) and hence one cannot
> compile the current basis library with an old compiler.  Doing a clean
> bootsrap should work.
> In general, we try to always keep the CVS so that one can do a clean
> bootstrap from the previous stable release of MLton.

The original poster encountered a legitimate bug; I checked in a fix
this morning at 9:30AM EST.  The problem was along the following lines in

structure Char2 =
    type t = char16


structure Char2 =
    open Char2
    val op < = _prim "WordU16_lt": char * char -> bool;

Hence, the "char" in the type of Char2.< was the top-level char = char8.
The elaborator doesn't check the types of primitives, but the XML
type-checker does.