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

Marc Weber marco-oweber at gmx.de
Sun Apr 17 15:44:03 EDT 2011


Today I've spent a fair amount of time on trying to understand why this
doesn't work:

  (* first example - type level record projection - doesn't compile *)
  con tr_types :: {Type} = [A = int, B = string]
  val x : tr_types.A = 7

gianp on irc was so kind pointing me out that the manual contains an obvious (n
in IN).
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?

Marc Weber



More information about the Ur mailing list