[MLton] cvs commit: exposed the types of {Int,Word}{8,16,32,64} using where

Matthew Fluet fluet@cs.cornell.edu
Tue, 18 Nov 2003 08:34:46 -0500 (EST)


> Using opacity is also problematic, because we would like the
> following program to fail.
>
> structure S:> sig type t end =
>    struct type t = LargeInt.int end
> val _ = 0: S.t

Why is this problematic?


> Hmmm.  It occurs to me that the same solution that we use for
> overloaded operators, which seems to work fine with keeping
> LargeInt.int and IntInf.int different, may work here.  That is, we
> could add some new declaration,
>
> _overload_const {int|real|word} as <ty> [and <ty>]*

That seems reasonable, although I'm sure that getting the basis
implementation right will be tricky.