[MLton-devel] Incompatibility with Moscow ML: "before"

Joe Hurd joe.hurd@comlab.ox.ac.uk
Fri, 17 Oct 2003 16:03:38 +0100 (BST)


I notice that the following program generates a type error in MLton:

carp:~$ mlton
MLton 20030716 (built Wed Jul 16 10:23:10 2003 on redhat71)
carp:~$ cat t.sml
infix before;
print ("s" before "t");
carp:~$ mlton t.sml
t.sml:2.12-2.18 Error: unify: can't unify
   t1: unit
   t2: char vector
t.sml:2.1-2.6 Error: unify: can't unify
   t1: char vector
   t2: unit
compilation aborted: type check reported errors

Moscow ML thinks that the type of before is 'a * 'b -> 'a, and so the
above is legal, but MLton wants before to be 'a * () -> 'a.

Is this a bug in one of the MLs?

Joe



-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel