diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-10-20 12:48:53 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-10-20 12:48:53 -0400 |
commit | 4ce29a476f2f02448db865787b55037b7b10da69 (patch) | |
tree | 06207c87f54c242948fab98a5331a12d0557c85d /lib/ur | |
parent | 2fdb4d380392a2a221e4f0ebec1bf555e2c73ba3 (diff) |
Start of user management
Diffstat (limited to 'lib/ur')
-rw-r--r-- | lib/ur/basis.urs | 14 | ||||
-rw-r--r-- | lib/ur/top.ur | 4 | ||||
-rw-r--r-- | lib/ur/top.urs | 6 |
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] => |