[MLton] (possible) front-end bug

Matthew Fluet fluet@cs.cornell.edu
Tue, 20 Jan 2004 21:00:12 -0500 (EST)


MLton accepts the following program:

signature S =
sig
   datatype t = A | B
   datatype u = C | D
end
structure Z : S =
struct
   datatype t = A | B
   datatype u = C | D
end
signature T =
sig
  structure Y : S where type t = Z.t
                    and type u = Z.t
end
structure X : T =
struct
   structure Y = Z
end

SML/NJ gives:
z.sml:18.1-21.4 Error: type u does not match definitional specification

I suspect that SML/NJ is correct; a datatype in a signature would be an
(implicit) definitional specification, wouldn't it?