[MLton-commit] r6295

Vesa Karvonen vesak at mlton.org
Wed Jan 2 06:25:12 PST 2008


Reverted a change made in revision 6046.

Tycon.newString and Tycon.fromString have the same effect except that
Tycon.newString leaves the printName of the tycon unset while
Tycon.fromString sets the given string as the printName for type tycon.

In revision 6046, the code was changed to use Tycon.newString.  An effect
of that change was that the names of many (more?) tycons in compiler
output (e.g. output produced by show-basis) included a generated suffix.
Although such names are more precise in some sense, the generated suffices
make the tycon names less readable to a programmer.

This commit reverts the code to use Tycon.fromString.  Regression tests
seem to pass and the code from the bug report that was fixed by revision
6046 also seems to compile correctly.

----------------------------------------------------------------------

U   mlton/trunk/mlton/elaborate/elaborate-env.fun

----------------------------------------------------------------------

Modified: mlton/trunk/mlton/elaborate/elaborate-env.fun
===================================================================
--- mlton/trunk/mlton/elaborate/elaborate-env.fun	2007-12-31 01:58:11 UTC (rev 6294)
+++ mlton/trunk/mlton/elaborate/elaborate-env.fun	2008-01-02 14:25:10 UTC (rev 6295)
@@ -677,7 +677,7 @@
 val newTycon: string * Kind.t * AdmitsEquality.t * Region.t -> Tycon.t =
    fn (s, k, a, r) =>
    let
-      val c = Tycon.newString s
+      val c = Tycon.fromString s
       val _ = TypeEnv.initAdmitsEquality (c, a)
       val _ = TypeEnv.tyconRegion c := SOME r
       val _ = List.push (allTycons, c)




More information about the MLton-commit mailing list