First class modules (was Existential Typing)

Simon Peyton-Jones simonpj@microsoft.com
Thu, 1 Nov 2001 03:49:19 -0800


| artificial restriction.   I think extending the system with=20
| some form of=20
| subtyping between records would be important for a usable=20
| system.   Your=20
| paper suggested that you are planning to do this.   Any=20
| thoughts on current=20
| ideas in this direction?

Yes, we should really say something about this in the paper.

A key design choice in our system is to use *nominal* not *structural*
typing.   The structural choice makes perfect sense, but it leads to=20
complications we don't have (as well as benefits).  So we don't have
structural subtyping, and it would not be easy to add it.

On the other hand, one could add nominal subtyping without too
much difficulty:

	record A =3D { x,y :: Int }
	record B <: A =3D { z :: Int }

We have not done that yet, but Mark thinks it would could be done
without bad interaction with what we have already.

Simon