[MLton] Minor front-end extension

Stephen Weeks MLton@mlton.org
Wed, 11 Aug 2004 09:51:19 -0700

> The goal would be to help our junior developper think about writing
> signatures.

OK, so it's a pedagogical thing, and not intended to help debug large
programs (unlike, e.g., -default-ann 'warnUnused true').  Given that,
a simple syntactic rule seems fine.  How about the following?

1. In structure bindings where "struct end" is on the rhs of the
binding, require an explicit SIG on the lhs.

	structure S: SIG = struct end

2. In other structure bindings, there is no such requirement.

3. In functor bindings, always require a result signature.

	functor F (): SIG = ...

That should be easy to add.