20000712 bug report
Henry Cejtin
henry@sourcelight.com
Thu, 10 Aug 2000 12:25:29 -0500
MLton currentl, sadly, has no support for checking for syntax/type errors.
As mentioned in the documentation, given a program which doesn't type check,
it is even possible for the compiler to fail to terminate. At the moment, we
use another ML compiler to do that checking. We've been discussing coming up
with our own pass which would do this, but, as you point out, it isn't
trivial because of the need for things like good error messages.
I don't know if it was obvious to you, but the error in the second program is
that the associativity of function application is left-to-right, so the line
fun main () = args CommandLine.arguments ()
tries to apply args (a function of type string list -> unit) to
CommandLine.arguments, and to apply the result of that to ().