diff options
author | Adam Chlipala <adamc@hcoop.net> | 2010-01-02 13:31:59 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2010-01-02 13:31:59 -0500 |
commit | c8de04e4f81490bfde750375c55de2a260072e82 (patch) | |
tree | 8003213999cf3e6ad98db16c29cd135654599d1a /lib/ur/top.ur | |
parent | 96ab8b7ac77b4b13e1aaa9afe35834ff60a6759b (diff) |
Proper 404 generation
Diffstat (limited to 'lib/ur/top.ur')
-rw-r--r-- | lib/ur/top.ur | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur index b6f6349a..613f5ec5 100644 --- a/lib/ur/top.ur +++ b/lib/ur/top.ur @@ -246,6 +246,24 @@ fun queryX' [tables ::: {{Type}}] [exps ::: {Type}] [ctx ::: {Unit}] [inp ::: {T 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) = |