Unlike CAML records, BitC allows re-use of record labels across
structure definitions. Consider the following situation:
(defstruct (a 'a) A:'a)
(defstruct (b 'a) A:'a)
(define (f x) x.A)
This is actually a special case of type-case, but one that matters.
In order to correctly type f, we need a mechanism like match-functions[1].
Otherwise, we will have to declare an error and require disambiguation
(or worse choose one arbitrarily). In that case, the restriction is (in
theory) no less restrictive than CAML's no-reuse restriction.
[1] http://www.cs.jhu.edu/~pari/papers/fool2004/first-class_FOOL2004.pdf
Swaroop.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev