[Ur] typechecker rejects form handler

Adam Chlipala adamc at csail.mit.edu
Sat Jan 4 13:59:32 EST 2014

On 01/04/2014 01:57 PM, Sergey Mironov wrote:
> Wow, sorry for that. Unfortunately, it is not my only trouble with
> this sample. Please, see FormBug2.ur (in attach). I've replaced !=
> with `eq' call.
> The new errors are
>   $ urweb -dbms sqlite FormBug2
>   :0:0: (to 0:0) Duplicate HTTP tag validator

Your code needs to create URLs referencing the function [validator], but 
multiple versions of it must exist due to multiple (static) calls to its 
enclosing function, and they'd all get the name "validator" in URLs.  
Try making the enclosing function a functor instead, so you get to 
choose a module name for its outputs manually, providing the compiler 
with advice about namespacing.

More information about the Ur mailing list