summaryrefslogtreecommitdiff
path: root/lib/ur/top.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-03-04 13:47:16 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-03-04 13:47:16 -0500
commit44dd54e977e98bc68c94d4cccc344d2ee769e8ec (patch)
tree59d474ae7fde02a0d0cd787a576b3f4d25170106 /lib/ur/top.ur
parent46e60fb6904b05340446e12d4a88a090b19b85fa (diff)
Louder jscomp; toUpper/Lower fix for JavaScript
Diffstat (limited to 'lib/ur/top.ur')
-rw-r--r--lib/ur/top.ur8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur
index b6e4f6cf..617423db 100644
--- a/lib/ur/top.ur
+++ b/lib/ur/top.ur
@@ -215,6 +215,14 @@ fun mapX3 [K] [tf1 :: K -> Type] [tf2 :: K -> Type] [tf3 :: K -> Type] [ctx :: {
<xml>{f [nm] [t] [rest] ! r1 r2 r3}{acc}</xml>)
<xml/>
+fun query1 [t ::: Name] [fs ::: {Type}] [state ::: Type] (q : sql_query [t = fs] [])
+ (f : $fs -> state -> transaction state) (i : state) =
+ query q (fn r => f r.t) i
+
+fun query1' [t ::: Name] [fs ::: {Type}] [state ::: Type] (q : sql_query [t = fs] [])
+ (f : $fs -> state -> state) (i : state) =
+ query q (fn r s => return (f r.t s)) i
+
fun queryL [tables] [exps] [tables ~ exps] (q : sql_query tables exps) =
query q
(fn r ls => return (r :: ls))