From c4120c8ddaa5340efad5f835ce4565f2a8ae2cbf Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 26 Dec 2009 11:56:40 -0500 Subject: Make summary unification more conservative; infer implicit arguments after applications --- demo/batchFun.ur | 78 +++++++++++------------ demo/crud.ur | 96 ++++++++++++++-------------- demo/metaform.ur | 26 ++++---- demo/more/dbgrid.ur | 34 +++++----- demo/more/grid.ur | 170 ++++++++++++++++++++++++------------------------- demo/more/grid1.ur | 14 ++-- demo/more/orm.ur | 48 +++++++------- demo/more/orm1.ur | 6 +- demo/more/versioned.ur | 76 +++++++++++----------- demo/sum.ur | 6 +- demo/tcSum.ur | 6 +- 11 files changed, 280 insertions(+), 280 deletions(-) (limited to 'demo') diff --git a/demo/batchFun.ur b/demo/batchFun.ur index c75cbb07..3f0317a8 100644 --- a/demo/batchFun.ur +++ b/demo/batchFun.ur @@ -45,14 +45,14 @@ functor Make(M : sig 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 @@ functor Make(M : sig | 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