mosml icon indicating copy to clipboard operation
mosml copied to clipboard

real should not admit equality

Open PH111P opened this issue 6 years ago • 0 comments

Currently, real is an eqtype which it shouldn't be, according to the SML Standard (see Appendix C). In particular, the following code should fail to elaborate:

1.0 = 1.0;
fn x => x = 1.0;

Further, the current equality on real does not work too well (as one would expect, I'd say):

Moscow ML version 2.10
Enter `quit();' to quit.
- 1.0000000000000001 = 1.0;
> val it = true : bool

- 1.0000000000000001;
> val it = 1.0 : real

PH111P avatar Nov 01 '19 12:11 PH111P