[Ur] Using a type variable for the type of a table

Istvan Chung istvan at vivatropolis.org
Sun May 26 21:38:26 EDT 2013


I have in my .ur file the following lines:

    type t = {A : int, B : float, C : string}
    table theTable : t

However, this causes Ur/Web to emit the following error message:

    Wrong kind
    Constructor:
    {A : int, B : float, C : string}
      Have kind:  Type
      Need kind:  {Type}
    Incompatible kinds
    Kind 1:  Type
    Kind 2:  {Type}

In contrast, this works (but is less to my liking for various reasons):

    table theTable : {A : int, B : float, C : string}

Is there any way to use a type variable in the table declaration instead
of writing out the actual type?

Thanks,
-- 
Istvan Chung



More information about the Ur mailing list