diff demo/more/dbgrid.ur @ 1093:8d3aa6c7cee0

Make summary unification more conservative; infer implicit arguments after applications
author Adam Chlipala <adamc@hcoop.net>
date Sat, 26 Dec 2009 11:56:40 -0500
parents fbc3a0eef45a
children f0afe61a6f8b
line wrap: on
line diff
--- a/demo/more/dbgrid.ur	Fri Dec 25 10:48:02 2009 -0500
+++ b/demo/more/dbgrid.ur	Sat Dec 26 11:56:40 2009 -0500
@@ -384,31 +384,31 @@
                        val wholeRow = @Folder.concat ! M.keyFolder M.rowFolder
 
                        fun ensql [env] (r : $(M.key ++ M.row)) =
-                           map2 [rawMeta] [id] [sql_exp env [] []]
-                           (fn [t] meta v => @sql_inject meta.Inj v)
-                           [_] wholeRow M.raw r
+                           @map2 [rawMeta] [id] [sql_exp env [] []]
+                            (fn [t] meta v => @sql_inject meta.Inj v)
+                            wholeRow M.raw r
 
                        val new =
-                           row <- Monad.mapR [rawMeta] [id]
-                                              (fn [nm :: Name] [t :: Type] meta => meta.New)
-                                              [_] wholeRow M.raw;
+                           row <- @Monad.mapR _ [rawMeta] [id]
+                                   (fn [nm :: Name] [t :: Type] meta => meta.New)
+                                   wholeRow M.raw;
                            dml (insert M.tab (ensql row));
                            return row
 
                        fun selector (r : $M.key) : sql_exp [T = M.key ++ M.row] [] [] bool =
-                         foldR2 [rawMeta] [id]
-                                [fn key => rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool]
-                                (fn [nm :: Name] [t :: Type] [key :: {Type}] [[nm] ~ key]
-                                    (meta : rawMeta t) (v : t)
-                                    (exp : rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool)
-                                    [rest :: {Type}] [rest ~ [nm = t] ++ key] =>
-                                    (WHERE T.{nm} = {@sql_inject meta.Inj v} AND {exp [[nm = t] ++ rest] !}))
-                                (fn [rest :: {Type}] [rest ~ []] => (WHERE TRUE))
-                                [_] M.keyFolder (M.raw --- map rawMeta M.row) r
-                                [_] !
+                         @foldR2 [rawMeta] [id]
+                          [fn key => rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool]
+                          (fn [nm :: Name] [t :: Type] [key :: {Type}] [[nm] ~ key]
+                                           (meta : rawMeta t) (v : t)
+                                           (exp : rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool)
+                                           [rest :: {Type}] [rest ~ [nm = t] ++ key] =>
+                              (WHERE T.{nm} = {@sql_inject meta.Inj v} AND {exp [[nm = t] ++ rest] !}))
+                          (fn [rest :: {Type}] [rest ~ []] => (WHERE TRUE))
+                          M.keyFolder (M.raw --- map rawMeta M.row) r
+                          [_] !
 
                        fun save key row =
-                           dml (update [M.key ++ M.row] !
+                           dml (update [M.key ++ M.row]
                                        (ensql row)
                                        M.tab
                                        (selector key))