changeset 1363:7dd8a6704265

Top.queryI1; fix definition of uw_Basis_minTime
author Adam Chlipala <adam@chlipala.net>
date Fri, 24 Dec 2010 16:41:10 -0500
parents fd34210bc3e5
children 0dec38af601c
files lib/ur/top.ur lib/ur/top.urs src/c/urweb.c
diffstat 3 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ur/top.ur	Fri Dec 24 12:51:46 2010 -0500
+++ b/lib/ur/top.ur	Fri Dec 24 16:41:10 2010 -0500
@@ -241,6 +241,12 @@
           (fn fs _ => f fs)
           ()
 
+fun queryI1 [nm ::: Name] [fs ::: {Type}] (q : sql_query [] [nm = fs] [])
+            (f : $fs -> transaction unit) =
+    query q
+          (fn fs _ => f fs.nm)
+          ()
+
 fun queryX [tables ::: {{Type}}] [exps ::: {Type}] [ctx ::: {Unit}] [inp ::: {Type}]
            [tables ~ exps] (q : sql_query [] tables exps)
            (f : $(exps ++ map (fn fields :: {Type} => $fields) tables)
--- a/lib/ur/top.urs	Fri Dec 24 12:51:46 2010 -0500
+++ b/lib/ur/top.urs	Fri Dec 24 16:41:10 2010 -0500
@@ -152,6 +152,11 @@
                  -> transaction unit)
              -> transaction unit
 
+val queryI1 : nm ::: Name -> fs ::: {Type}
+              -> sql_query [] [nm = fs] []
+              -> ($fs -> transaction unit)
+              -> transaction unit
+
 val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type}
              -> [tables ~ exps] =>
              sql_query [] tables exps
--- a/src/c/urweb.c	Fri Dec 24 12:51:46 2010 -0500
+++ b/src/c/urweb.c	Fri Dec 24 16:41:10 2010 -0500
@@ -3415,7 +3415,7 @@
   return r;
 }
 
-const uw_Basis_time minTime = 0;
+const uw_Basis_time uw_Basis_minTime = 0;
 
 uw_Basis_time uw_Basis_now(uw_context ctx) {
   return time(NULL);