M. Scott Doerrie wrote:
Jonathan S. Shapiro wrote:


There is no intrinsic problem in the type system with this
instantiation, but it has an unpleasant consequence: deeply immutable
procedures cannot invoke methods because they may later be instantiated
in a way that violates deep immutability.

How do type classes propagate over interfaces?
If type class instances can propagate over the interface boundary without being defined in the interface, then I agree that additional syntax is needed.

I am not sure what you mean by propagation of type-classes. If what you mean is that some methods of an instantiation are defined in other interfaces/modules, this should certainly be true.


3. Introduce a new variation on function types:

 (di-fn T.arg T.result)

that describes deeply immutable procedures.
If I declare a di-fn using a type class, other future instances of that type class could cause my function to become stateful.

No. di-fn declaration in a type-class can only be satisfied by a di-fn definition. The compiler will make sure that all di-fns are deeply non-mutating at the time (actually place) of definition.

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

Reply via email to