[MLton] funny error message

Stephen Weeks MLton@mlton.org
Fri, 23 Sep 2005 09:44:53 -0700


> It wasn't that the program was rejected that I was complaining about
> (as you say, just the usual need to inverse-eta) it was just the
> error message.  I expected a complaint about not being able to
> generalize the type.

I also expect that.  For example, the program

  fun id x = x
  structure S: sig val f: 'a -> 'a end = struct val f = id id end

causes MLton to produce the following error.

  Variable type in structure disagrees with signature.
    variable: f
    unable to generalize: 'a
    signature: 'a -> 'a

Perhaps you could send a short program fragment that generates the
funny error.