diff lib/ur/top.ur @ 1110:7fc4e0087e50

Proper 404 generation
author Adam Chlipala <adamc@hcoop.net>
date Sat, 02 Jan 2010 13:31:59 -0500
parents 8d3aa6c7cee0
children ad15700272f6
line wrap: on
line diff
--- a/lib/ur/top.ur	Fri Jan 01 12:48:06 2010 -0500
+++ b/lib/ur/top.ur	Sat Jan 02 13:31:59 2010 -0500
@@ -246,6 +246,24 @@
               return <xml>{acc}{r}</xml>)
           <xml/>
 
+fun queryX1' [nm ::: Name] [fs ::: {Type}] [ctx ::: {Unit}] [inp ::: {Type}]
+             (q : sql_query [nm = fs] [])
+             (f : $fs -> transaction (xml ctx inp [])) =
+    query q
+          (fn fs acc =>
+              r <- f fs.nm;
+              return <xml>{acc}{r}</xml>)
+          <xml/>
+
+fun queryXE' [exps ::: {Type}] [ctx ::: {Unit}] [inp ::: {Type}]
+             (q : sql_query [] exps)
+             (f : $exps -> transaction (xml ctx inp [])) =
+    query q
+          (fn fs acc =>
+              r <- f fs;
+              return <xml>{acc}{r}</xml>)
+          <xml/>
+
 fun hasRows [tables ::: {{Type}}] [exps ::: {Type}]
             [tables ~ exps]
             (q : sql_query tables exps) =