Sandro Magi wrote:
> Jonathan S. Shapiro wrote:
>> What we now have in mind is to introduce a new constraint:
>>
>>   (has-field 'a name 'b)
>>
>> which is satisfied when the type 'a has a field with the given /name/,
>> and that field in turn has type 'b. So the type of:
>>
>>   (define (get-x v) v.x)
>>   get-x (forall ((has-field 'a v 'b))
>>           (fn 'a -> 'b))
>>
>> that is: we will now do polymorphic inference over field names.
> 
> Isn't this just record polymorphism?

Yes. It is like Ocaml's row types expressed in constraint form
using the has-field constraint.

Swaroop.



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

Reply via email to