[clean-list] Serious bug in the type system

John van Groningen johnvg at cs.ru.nl
Wed Jan 2 17:14:46 MET 2008


Edsko de Vries wrote:
>...
>But it's not enough to check if the result is a unique array with
>unboxed values, is it?

No, the arguments should also be non-unique (or not used anymore).

>The only reason that copy2 should be allowed is
>that the result of 'copy' is a *new* array; but that cannot really be
>expressed through uniqueness typing (we need something like Odersky's
>observer type system?). There is no way in a uniqueness type system to
>make the distinction between the result of 'copy' and the result of 'id'
>(unless perhaps you want to use the fact that the domain of copy is
>non-unique and the result is unique?).

Yes I used the fact that the arguments of copy are non-unique and the result
is unique. It is not possible to create a unique array from non-unique
values, so if the result is unique, it must be a *new* array.

Kind regards,

John van Groningen


More information about the clean-list mailing list