[MLton-devel] Word32.toLargeIntX discrepancy between MLton and SMLNJ

Stephen Weeks MLton@mlton.org
Sat, 13 Jul 2002 11:11:42 -0700


> While this is true, I'd say it's really a "bug" with the Basis Library.
> Nikos' problematic example
> > > fun bug x = (5 : Int32.int) = Word32.toLargeIntX x
> seems to be legal in an implementation that does not provide an IntInf
> structure, but becomes illegal when compiled under a basis that does
> provide an IntInf structure.  The fact that the type equivalnce of
> LargeInt.int and IntInf.int (or Int32.int) is exported makes porting
> between implementations more difficult than it should be.  

Complete agreement here.

> Really, I'd
> argue that the above should not type check in any implementation while
> fun good x = (5 : LargeInt.int) = Word32.toLargeIntX x
> should type check in all implementations.

That would be nice too.  At least the latter is true.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel