[MLton] Question about Definition of SML :)

Anoq of the Sun anoq@HardcoreProcessing.com
Mon, 08 Dec 2003 01:59:18 +0200

Stephen Weeks wrote:
> As I said earlier, the Definition requires the elaborator to find an
> elaboration if one exists (see the end of G.8).  If it didn't do this,
> it would be perfectly legal for the elaborator to reject all programs.

OK - I get it now. I don't like it much though ;)
I like the point that Andreas made in the discussion you sent the link to -
about having a simple local rule to reject invalid declarations.

It is what I intend to do in the semantics I have now. But I can
see that I probably need to explicitly state the requirement
that each val declaration must give a principal type scheme.
I thought that this was what was implied in taking the closure though.

So I guess my language is a little more restrictive here.

I don't like that the sequence of declarations at top-level would
behave differently than at nested let-expressions actually.
Also I can't see that allowing these few extra programs would
really be any benefit. There are so many other places where
ML requires one to make an explicit type constraint already.

Anyway - thanks a lot for the clarifications! At least I believe
I understand it - and I think I can now make a slightly simpler semantics
than SML'97 (regarding this particular issue at least) without
worrying too much about that it will give any problems.