[Ur] datebox.urp - compiler errors: "unification failure"

Ziv Scully ziv at mit.edu
Sat Aug 1 20:24:42 EDT 2015


I think this is a name conflict between the [a] representing the
transaction for the onclick handler and the [a] for the anchor tag. Curious
that this used to not be a problem (I think it's always been a problem for
me and assumed it was just the way Ur/Web was). Try renaming the
transaction [a] to see if that works. At the same time, it seems like this
code would ideally be okay as is.


On Sat, Aug 1, 2015 at 5:05 PM, Stefan Scott Alexander <
stefanscottalexx at gmail.com> wrote:

> Searching for an example of a DatePicker, I also found this code, last
> updated 3 years ago:
>
> https://github.com/urweb/gui/blob/master/examples/datebox.urp
>
> I tried compiling this, but got some "unification failure" errors (shown
> at the end of this message).
>
> I assume this example may be slightly out-of-date, but I'm unsure how to
> update it to get it to work.
>
> Thanks for any help!
>
> === BEGIN COMPILER OUTPUT ===
>
> gui/examples$ urweb datebox
>
> gui/remotePager.ur:16:78: (to 16:80) Unification failure
> Expression:  a
>   Have con:  transaction {}
>   Need con:  <UNIF:U43::Type> -> <UNIF:U44::Type>
> Incompatible constructors
> Have:  transaction {}
> Need:  <UNIF:U43::Type> -> <UNIF:U44::Type>
>
> gui/remotePager.ur:23:71: (to 23:73) Unification failure
> Expression:  a
>   Have con:  transaction {}
>   Need con:  <UNIF:U129::Type> -> <UNIF:U130::Type>
> Incompatible constructors
> Have:  transaction {}
> Need:  <UNIF:U129::Type> -> <UNIF:U130::Type>
>
> gui/remotePager.ur:24:85: (to 24:87) Unification failure
> Expression:  a
>   Have con:  transaction {}
>   Need con:  <UNIF:U204::Type> -> <UNIF:U205::Type>
> Incompatible constructors
> Have:  transaction {}
> Need:  <UNIF:U204::Type> -> <UNIF:U205::Type>
>
> gui/examples$
>
> === END COMPILER OUTPUT ===
>
> ###
>
>
>
>
>
>
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20150801/0dd11caa/attachment.html>


More information about the Ur mailing list