Mercurial > urweb
diff lib/ur/list.ur @ 908:ed06e25c70ef
Convert to requiring explicit 'rpc' marker
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 22 Aug 2009 12:55:18 -0400 |
parents | 1c2f335297b7 |
children | b873feb3eb52 |
line wrap: on
line diff
--- a/lib/ur/list.ur Tue Aug 11 12:01:54 2009 -0400 +++ b/lib/ur/list.ur Sat Aug 22 12:55:18 2009 -0400 @@ -217,6 +217,13 @@ app' end +fun mapQuery [tables ::: {{Type}}] [exps ::: {Type}] [t ::: Type] + [tables ~ exps] (q : sql_query tables exps) + (f : $(exps ++ map (fn fields :: {Type} => $fields) tables) -> t) = + query q + (fn fs acc => return (f fs :: acc)) + [] + fun assoc [a] [b] (_ : eq a) (x : a) = let fun assoc' (ls : list (a * b)) =