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
