[MLton-user] Compiler Bug?

Claudio Russo crusso@microsoft.com
Wed, 13 Jul 2005 14:17:15 +0100


I think MLton is actually correct, and Moscow ML is wrong. According to the Revised Definition of Standard ML,  real is not an equality type (though it used to be in original SML).

Cheers,

Claudio

> -----Original Message-----
> From: mlton-user-admin@mlton.org 
> [mailto:mlton-user-admin@mlton.org] On Behalf Of Michael Nissen
> Sent: Wednesday, July 13, 2005 1:06 PM
> To: MLton-user@mlton.org
> Subject: [MLton-user] Compiler Bug?
> 
> Hi
> 
> I am a mlton newbie, and I have a problem with the mlton compiler.
> I use version: MLton 20040227 (built Fri Feb 27 21:23:55 2004 
> on redhat71)
> 
> In its simplest form, the problem is as follows:
> When I try to compile the following ML program
> 
> datatype Decimal = Real of real;
> fun decimalEq(Real r1, Real r2) = r1 = r2
> 
> I get the compilererror message:
> function applied to incorrect argument
>     expects: [<equality>] * [<equality>]
>     but got: [<non-equality>] * [<non-equality>]
>     in: = (r1, r2)
> 
> The program compiles without problems with the Moscow ML 
> version 2.01 compiler (as it should).
> What causes this problem?
> 
> _________________
> Mvh.
> Michael Nissen
> Fondsprogrammør NEXT, DIKU
> 
> _______________________________________________
> MLton-user mailing list
> MLton-user@mlton.org
> http://mlton.org/mailman/listinfo/mlton-user
>