M. Scott Doerrie wrote:
Ok, I hurridly misread this. The di-fn type is a more general
solution. Somehow I had read constructor.
Would this mean that di-fn is itself some sort of type class? (di-fn
T.arg T.result) should be usable where (fn T.arg T.result) is required.
Of course, this isn't expressible in the current system as our type
classes only involve methods of fn types. This is probably incorrect,
but could we think of di-fn as the following:
(deftypeclass (di-fn 'a 'b)
(super (fn 'a 'b)))
Of course, this is not user-definable as it's a known type to check for
deep imutability in the compiler.
di-fn in a property of the function that the compiler needs to enforce
wrt its definition. So, I think it is best viewed as a primitive.
Swaroop.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev