comparison lib/top.urs @ 334:9601c717d2f3

queryX
author Adam Chlipala <adamc@hcoop.net>
date Sat, 13 Sep 2008 19:49:53 -0400
parents 02d15d81ae9b
children 34847732cefc
comparison
equal deleted inserted replaced
333:c655eddc3795 334:9601c717d2f3
17 17
18 val foldTRX2 : tf1 :: (Type -> Type) -> tf2 :: (Type -> Type) -> ctx :: {Unit} 18 val foldTRX2 : tf1 :: (Type -> Type) -> tf2 :: (Type -> Type) -> ctx :: {Unit}
19 -> (nm :: Name -> t :: Type -> rest :: {Type} -> [nm] ~ rest 19 -> (nm :: Name -> t :: Type -> rest :: {Type} -> [nm] ~ rest
20 -> tf1 t -> tf2 t -> xml ctx [] []) 20 -> tf1 t -> tf2 t -> xml ctx [] [])
21 -> r :: {Type} -> $(mapTT tf1 r) -> $(mapTT tf2 r) -> xml ctx [] [] 21 -> r :: {Type} -> $(mapTT tf1 r) -> $(mapTT tf2 r) -> xml ctx [] []
22
23 val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit}
24 -> sql_query tables exps -> tables ~ exps
25 -> ($(exps ++ fold (fn nm (fields :: {Type}) acc => [nm] ~ acc => [nm = $fields] ++ acc) [] tables)
26 -> xml ctx [] [])
27 -> transaction (xml ctx [] [])