# HG changeset patch # User Adam Chlipala # Date 1261846600 18000 # Node ID 8d3aa6c7cee01e98bb7104e6f382116b2d163803 # Parent 6f4b05fc43617649cd4b1e63f1b3a48e003f6462 Make summary unification more conservative; infer implicit arguments after applications diff -r 6f4b05fc4361 -r 8d3aa6c7cee0 CHANGELOG --- a/CHANGELOG Fri Dec 25 10:48:02 2009 -0500 +++ b/CHANGELOG Sat Dec 26 11:56:40 2009 -0500 @@ -2,6 +2,7 @@ Next ======== +- Automatic insertion of implicit arguments in more positions - Reifying expressions as URLs and redirecting to them explicitly - More syntactic sugar for SQL - Typing of SQL queries no longer exposes which tables were used in joins but diff -r 6f4b05fc4361 -r 8d3aa6c7cee0 demo/batchFun.ur --- a/demo/batchFun.ur Fri Dec 25 10:48:02 2009 -0500 +++ b/demo/batchFun.ur Sat Dec 26 11:56:40 2009 -0500 @@ -45,14 +45,14 @@ fun add r = dml (insert t - (foldR2 [fst] [colMeta] - [fn cols => $(map (fn t :: (Type * Type) => - sql_exp [] [] [] t.1) cols)] - (fn [nm :: Name] [t :: (Type * Type)] [rest :: {(Type * Type)}] - [[nm] ~ rest] input col acc => - acc ++ {nm = @sql_inject col.Inject input}) - {} [M.cols] M.fl (r -- #Id) M.cols - ++ {Id = (SQL {[r.Id]})})) + (@foldR2 [fst] [colMeta] + [fn cols => $(map (fn t :: (Type * Type) => + sql_exp [] [] [] t.1) cols)] + (fn [nm :: Name] [t :: (Type * Type)] [rest :: {(Type * Type)}] + [[nm] ~ rest] input col acc => + acc ++ {nm = @sql_inject col.Inject input}) + {} M.fl (r -- #Id) M.cols + ++ {Id = (SQL {[r.Id]})})) fun doBatch ls = case ls of @@ -72,11 +72,11 @@ | Cons (r, ls) => {[r.Id]} - {foldRX2 [colMeta] [fst] [_] - (fn [nm :: Name] [p :: (Type * Type)] [rest :: {(Type * Type)}] - [[nm] ~ rest] m v => - {m.Show v}) - [M.cols] M.fl M.cols (r -- #Id)} + {@foldRX2 [colMeta] [fst] [_] + (fn [nm :: Name] [p :: (Type * Type)] [rest :: {(Type * Type)}] + [[nm] ~ rest] m v => + {m.Show v}) + M.fl M.cols (r -- #Id)} {if withDel then