While we are proposing things, here's a further suggestion.
The great thing about this suggestion is that it only *removes*
a restriction, and makes the language definition simpler.
It is fully backward compatible.

The suggestion is:

        Remove the restriction that type synonym
        declarations must not be recursive.

In other words, one could write things like

        type  Stream a  =  (a, Stream a)

which is equivalent to the type (a, (a, (a, ...))).

The only reason we included the restriction at the time was

        (a)  it makes unification easier to implement
        (b)  it was more standard
        (c)  there didn't seem any compelling reason *not*
             to include the restriction.

Guy Steele has since pointed out several compelling examples
where it would be *much* easier not to have the restriction,
and I've encountered a few myself.  Let's trash it!

The obvious way to go is for someone to implement it first, to
make sure it's not difficult.  Mark Jones, have you tried this
in Gofer yet?

Cheers,  -- P

-----------------------------------------------------------------------
Professor Philip Wadler                        [EMAIL PROTECTED]
Department of Computing Science                    tel: +44 41 330 4966
University of Glasgow                              fax: +44 41 330 4913
Glasgow G12 8QQ, SCOTLAND


Reply via email to