I've redesigned my program - merged two functions (`pnew' and `pview') into one. Form handler is no longer parametrized with functions returning urls so urweb doesn't have to duplicate it anymore. Example compiles fine, Thanks!
If I understand correctly, it is the two specialized versions of `validator' which cause problems in my example. But does this mean that specializations are not usable in practice at the moment? Do you plan to introduce some kind of automatic names generator for cases like this one? I think, it would be fine If urweb had made two urls (say, `validator0' and `validator1' ) out of two static copies of `validator' in my example. I vote for this improvement until there are counterexamples demonstrating how this improvement may violate the security or confuse something. Regards, Sergey 2014/1/4 Adam Chlipala <[email protected]>: > 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. _______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
