[Ur] Invalid Link expression (again)
Adam Chlipala
adamc at csail.mit.edu
Thu Aug 8 16:37:19 EDT 2013
On 08/08/2013 04:33 PM, Sergey Mironov wrote:
> Hi. I've run into the same problem when passing link generator as an
> argument (see 'template' function at [1]). Is there any way to help Ur
> in generating correct link without using functors? Maybe build<a></a>
> explicitly using xml values like
>
> fun makeLink f =
> let a = xml ... black magic .. in a
>
> [1] - https://github.com/grwlf/foocms/blob/master/tst/room2/main.ur
>
There's a good chance this will work fine if you just swap the order of
the first two arguments to [template]. The compiler auto-specializes
functions to statically known _prefixes_ of their arguments, so if the
[state] isn't statically known, your current version will fail to get
specialized to a form without first-class function arguments, while the
swapped version might succeed.
More information about the Ur
mailing list