[MLton] free type variables in datatype decs

Andreas Rossberg rossberg@ps.uni-sb.de
Fri, 04 Feb 2005 16:45:50 +0100


> There are two reasons why you want to disallow free type variables in
> type definitions.
>  
>  1. To be able to specify Alice ML by extending the type-erasure
>     dynamic semantics of the Definition.
>  2. Performance (you don't want to pass types to polymorphic functions
>     at run time).

Yes. More generally, my point was that such a relaxation has much deeper 
implications than one might think at first, with these just being examples.

> From this, it's easy to see why I would think of different strategy
> with my MLton hat on, since we use typeful ILs plus whole-program
> optimization to ameliorate performance issues.  I.e., the MLton
> approach would be to keep all the types and figure out how to optimize
> it.

Yes. In fact, something like packages would not be of much use anyway 
with a closed-world assumption. After all, their purpose is to 
type-safely support dynamic import and linking.

-- 
Andreas Rossberg, rossberg@ps.uni-sb.de

Let's get rid of those possible thingies!  -- TB