[MLton-user] Potential bug in MLton.eq?
Nicholas Kidd
nakidd at gmail.com
Wed Apr 28 09:32:59 PDT 2010
Hi,
For the attached program ab.sml the following occurs:
----------------------------
$ cat ab.sml
datatype d = A of string | B of string
val v1 = A("y")
val v2 = A("x")
val _ = print ("v1 <eq> v2 : " ^ (Bool.toString (MLton.eq(v1,v2))) ^ "\n")
(*val _ = print ("v1 <equal> v2 : " ^ (Bool.toString
(MLton.equal(v1,v2))) ^ "\n")*)
$ mlton
MLton 20070826 (built Mon Sep 03 18:05:04 2007 on eponym)
$ mlton ab.sml
$ ./ab
v1 <eq> v2 : true
$ uname -a
Linux jack 2.6.26-2-686 #1 SMP Wed Feb 10 08:59:21 UTC 2010 i686 GNU/Linux
----------------------------
I believe the last line should be "v1 <eq> v2 : false" as v1 and v2
should not hold the same
address. The output was produced on Debian lenny, and has been
reproduced on OS 10.{5,6} and with MLton v7387
and v7452 from svn. Finally, uncommenting the last line outputs:
v1 <eq> v2 : false
v1 <equal> v2 : false
Any idea what could be going on?
Thanks,
-Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ab.sml
Type: application/octet-stream
Size: 232 bytes
Desc: not available
Url : http://mlton.org/pipermail/mlton-user/attachments/20100428/bce0c9cb/ab.obj
More information about the MLton-user
mailing list