summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-10-20 12:48:53 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-10-20 12:48:53 -0400
commit8ba88fa1aacb63cff48fe42ba7d3dcfc31c45bbb (patch)
tree06207c87f54c242948fab98a5331a12d0557c85d /lib
parente23f4d764bc93640cb08a7d6ebd7e261fac2cb05 (diff)
Start of user management
Diffstat (limited to 'lib')
-rw-r--r--lib/ur/basis.urs14
-rw-r--r--lib/ur/top.ur4
-rw-r--r--lib/ur/top.urs6
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index 9ddae8fe..7c3c0969 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -594,25 +594,25 @@ val img : bodyTag ([Src = url, Onabort = transaction unit, Onerror = transaction
Onload = transaction unit] ++ boxEvents)
val form : ctx ::: {Unit} -> bind ::: {Type}
- -> [[Body] ~ ctx] =>
- xml form [] bind
+ -> [[Body, Form] ~ ctx] =>
+ xml ([Body, Form] ++ ctx) [] bind
-> xml ([Body] ++ ctx) [] []
val subform : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type}
-> [[Form] ~ ctx] =>
nm :: Name -> [[nm] ~ use] =>
- xml form [] bind
+ xml ([Form] ++ ctx) [] bind
-> xml ([Form] ++ ctx) use [nm = $bind]
val subforms : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type}
- -> [[Form] ~ ctx] =>
+ -> [[Form, Subform] ~ ctx] =>
nm :: Name -> [[nm] ~ use] =>
- xml subform [Entry = $bind] []
+ xml ([Subform] ++ ctx) [Entry = $bind] []
-> xml ([Form] ++ ctx) use [nm = list ($bind)]
val entry : ctx ::: {Unit} -> bind ::: {Type}
- -> [[Subform] ~ ctx] =>
- xml form [] bind
+ -> [[Subform, Form] ~ ctx] =>
+ xml ([Form] ++ ctx) [] bind
-> xml ([Subform] ++ ctx) [Entry = $bind] []
con formTag = fn (ty :: Type) (inner :: {Unit}) (attrs :: {Type}) =>
diff --git a/lib/ur/top.ur b/lib/ur/top.ur
index 6ffc888f..6a0f8751 100644
--- a/lib/ur/top.ur
+++ b/lib/ur/top.ur
@@ -216,10 +216,10 @@ fun queryI [tables ::: {{Type}}] [exps ::: {Type}]
(fn fs _ => f fs)
()
-fun queryX [tables ::: {{Type}}] [exps ::: {Type}] [ctx ::: {Unit}]
+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)
- -> xml ctx [] []) =
+ -> xml ctx inp []) =
query q
(fn fs acc => return <xml>{acc}{f fs}</xml>)
<xml/>
diff --git a/lib/ur/top.urs b/lib/ur/top.urs
index 82090dd2..b6734cd3 100644
--- a/lib/ur/top.urs
+++ b/lib/ur/top.urs
@@ -125,12 +125,12 @@ val queryI : tables ::: {{Type}} -> exps ::: {Type}
-> transaction unit)
-> transaction unit
-val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit}
+val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type}
-> [tables ~ exps] =>
sql_query tables exps
-> ($(exps ++ map (fn fields :: {Type} => $fields) tables)
- -> xml ctx [] [])
- -> transaction (xml ctx [] [])
+ -> xml ctx inp [])
+ -> transaction (xml ctx inp [])
val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit}
-> [tables ~ exps] =>