Oh. Somebody (William?) asked earlier whether readonly and mutable
modifiers made sense. The answer is yes, but uncomfortably.

One interpretation of "readonly 'a" is "some type 'b that unifies with
readonly 'a". This can also be useful as a constraint, as in:

forall 'a ~ deeply immutable 'b
datatype list 'a is ...


That is: the type of deeply immutable lists...

The nasty part is that you'll end up with things that conflict through
expansion:

'a => mutable 'b => mutable readonly 'c


A resolution is needed to decide what wins in these cases, or at least
decides which nestings are legal.


shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to