[Ur] Function constructors

Adam Chlipala adamc at impredicative.com
Tue Dec 13 20:54:01 EST 2011


sampath kirupa shankar wrote:
> <a link= {transactions (r.Symbol,r.Shares)}> (I am sending two 
> parameters with transactions)
>
> and the function definition that I have given is
>
>  transactions (i:string,j:int)= return
> <xml>
> <body>
> <h2>{[i]} and {[j]}</h2>
> </body>
> </xml>
>
> Error:
> Can't unify record constructors
> Summary 1:  [#1 = Basis.string, #2 = Basis.int]
> Summary 2:  [#1 = Basis.string, #2 = Basis.string]
>     Field:  #2
>   Value 1:  Basis.int
>   Value 2:  Basis.string
> Incompatible constructors
> Con 1:  Basis.int
> Con 2:  Basis.string

My guess is that the type of [r.Shares] is [string], not [int] as 
required by the annotation in [transactions]'s definition.



More information about the Ur mailing list