[Ur] tuple projection exists / record projection doesn't?

Adam Chlipala adamc at impredicative.com
Sun Apr 17 19:46:17 EDT 2011


Marc Weber wrote:
> So what I was really starring at all the time was a tuple rather than a record
> projection:
>
>    (* second example - type level tuple projection - compiles *)
>    con tt_type_name = (int, #A)
>    val x : tt_type_name.1 = 7
>
> Is there a reason why no record projections exist?
>    

Yes: the kind of a type-level tuple tells you which indices are valid to 
project from it, while the kind of a type-level record doesn't.  This 
difference isn't fundamental to tuples vs. records; it just happens to 
be what's implemented in Ur/Web today.



More information about the Ur mailing list