[Ur] project to a fieldname list

Gergely Buday gbuday at gmail.com
Fri Oct 21 10:35:53 EDT 2011


Hi,

my idea is to write a function that projectds records to a given set
of names. Is it doable in Ur/Web?

My preliminary attempt is to fix the type of it:

con roles :: {Unit}  = [1, 2, 3]

fun projection [ r ::: {Type} ] (names :: {Unit}) (record : $r) : (map
(fn nm => record.nm) names) = ()

[gergoe at homeship sandbox]$ urweb books
books.ur:3:43-3:47: syntax error: replacing  KUNIT with  DOTDOTDOT
books.ur:3:87-3:88: syntax error: replacing  DOT with  COMMA

What is the problem with {Unit}, syntactically? And, with the dot as a
field operator?

- Gergely



More information about the Ur mailing list