Gergely Buday wrote:
Adam wrote:

I would do it as:

type copiedType = float (* fill something else in here *)

con copiedFields = [1, 2, 3] (* fill something else in here *)

type myRecord = $([MyField = int, MyOtherField = string] ++ mapU copiedType
copiedFields)
Thanks, this is clear. Is it possible to have a variable number of fields here?

Yes, as I tried to hint at before, you can write [myRecord] as a type-level function over [copiedFields], if you include an appropriate disjointness constraint.

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to