[MLton] funny error message

Stephen Weeks MLton@mlton.org
Mon, 26 Sep 2005 14:16:02 -0700


> My complaint (such as it is) is only concerning the wording of the
> second error message (on flatten).  To me, a type variable appearing
> is always (implicitly) quantified universally.  Here the derived
> type had an existential qualification.  (Right?) 

I wouldn't say existential, I'd say meaningless.  The point is that
the type variable appeared as a result of the mechanism by which MLton
implements signature matching.  It truly was a spurious error.  The
methods that I proposed were an attempt to better hide how MLton
implements signature matching in the cases when the matching fails.
Sadly, I think they're too complex to be worth it.

> In that case it would be nice to have some indication that that was
> what was going on.

Agreed.  We could explicitly list all quantified variables, which
would make clearer that something is amiss.  But my take is that in
the vast majority of cases not having the explicitly quantified
variables is clearer.  Plus it's more in keeping with the ML
philosophy.