Oh, interesting; my abstraction of your test case led me to find and fix
a different bug than was actually causing trouble for you. ;)
I think I've now fixed the original bug, in the public repo!
On 10/01/2013 07:17 AM, Sergey Mironov wrote:
Hmm, that could be, but if you mean the database directive of the
*urp, then I should say that I have one:
database dbname=App.db
I'll pull the urweb updates soon. For now I've created small project
containing the error and the copy of webapp.c. Repo is located here:
https://github.com/grwlf/urbugs/blob/master/AppMM.ur
Regards,
Sergey
2013/10/1 Adam Chlipala<[email protected]>:
On 09/30/2013 12:21 PM, Sergey Mironov wrote:
Consider following code:
fun noDml (q:dml) : transaction {} =
e<- tryDml q;
return {}
task initialize = fn {} =>
noDml (INSERT INTO page(Id, Caption) VALUES (0, "Top"));
noDml (INSERT INTO page(Id, Caption) VALUES (1, "Top"));
return {}
When compiling, urweb issues the following error:
dev:[grwlf@greyblade:~/proj/urdesign]$ LANG=C make
building stamp1
urweb -dbms sqlite AppMM
/tmp/filestFy18/webapp.c:371:37: error: unknown type name 'uw_Basis_dml'
Ah, this was just a case of a bad error message. I meant for the compiler
to complain that you haven't used a 'database' directive to declare the
database connection of this application, so it is not legal to use SQL
actions. There was a bug in the analysis for detecting when SQL is used in
program code, and your experience with small program variants "fixing" the
problem is just based on the particularities of that bug. It's fixed now,
in a changeset pushed to the public repo.
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur