[MLton-devel] Possible type-inference bug

Stephen Weeks MLton@mlton.org
Mon, 13 Oct 2003 17:34:33 -0700


> First, I do not know if this is a bug in the type-inference pass,
> but what I have here is being checked without problems by SML/NJ 
> 110.42 but not by mlton. I did not completely understand the known
> bug, so there is a caveat that I might have hit exactly that (read:
> I have not yet dug into that bug and why it is a bug and the SML
> code example in question).

Yes, you have hit the known bug.  The definition of Xml.buildTag is
more polymorphic than the specification.  Hence, the type of its uses
is unknown and the value restriction kicks in.

A simple fix is to constrain buildTag.

fun buildTag (name, paramlist: (string * string) list) = (name, paramlist)

BTW, you might want to remake MLton.  I've checked in a lot of
front-end improvments in the last 24 hours.

I'll start on the signature stuff as soon as can.  I still have one
other todo with the core stuff first: equality types.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel