diff src/urweb.grm @ 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 dcf98ae3c48d
children ce56795b2e5f
line wrap: on
line diff
--- a/src/urweb.grm	Fri Dec 25 10:48:02 2009 -0500
+++ b/src/urweb.grm	Sat Dec 26 11:56:40 2009 -0500
@@ -540,9 +540,8 @@
                                              val e = (EVar (["Basis"], "unique", Infer), loc)
                                              val e = (ECApp (e, #1 (#1 tnames)), loc)
                                              val e = (ECApp (e, (CRecord (#2 tnames), loc)), loc)
-                                             val e = (EDisjointApp e, loc)
                                          in
-                                             (EDisjointApp e, loc)
+                                             e
                                          end)
 
        | CHECK sqlexp                   (let
@@ -562,9 +561,6 @@
                                                                val e = (EVar (["Basis"], "mat_cons", Infer), loc)
                                                                val e = (ECApp (e, nm1), loc)
                                                                val e = (ECApp (e, nm2), loc)
-                                                               val e = (EDisjointApp e, loc)
-                                                               val e = (EDisjointApp e, loc)
-                                                               val e = (EApp (e, (EWild, loc)), loc)
                                                            in
                                                                (EApp (e, mat), loc)
                                                            end)
@@ -634,7 +630,7 @@
        | PRIMARY KEY tnames             (let
                                              val loc = s (PRIMARYleft, tnamesright)
 
-                                             val e = (EVar (["Basis"], "primary_key", Infer), loc)
+                                             val e = (EVar (["Basis"], "primary_key", TypesOnly), loc)
                                              val e = (ECApp (e, #1 (#1 tnames)), loc)
                                              val e = (ECApp (e, (CRecord (#2 tnames), loc)), loc)
                                              val e = (EDisjointApp e, loc)
@@ -1192,7 +1188,6 @@
 
                                              val e = (EVar (["Basis"], "update", Infer), loc)
                                              val e = (ECApp (e, (CWild (KRecord (KType, loc), loc), loc)), loc)
-                                             val e = (EDisjointApp e, loc)
                                              val e = (EApp (e, (ERecord fsets, loc)), loc)
                                              val e = (EApp (e, texp), loc)
                                          in
@@ -1335,11 +1330,8 @@
                                                  if et = "form" then
                                                      (EApp ((EVar (["Basis"], "form", Infer), pos),
                                                             xmlOpt), pos)
-                                                 else if et = "subform" then
-                                                     (EApp ((EDisjointApp (#2 (#1 tag)), pos),
-                                                            xmlOpt), pos)
-                                                 else if et = "subforms" then
-                                                     (EApp ((EDisjointApp (#2 (#1 tag)), pos),
+                                                 else if et = "subform" orelse et = "subforms" then
+                                                     (EApp (#2 (#1 tag),
                                                             xmlOpt), pos)
                                                  else if et = "entry" then
                                                      (EApp ((EVar (["Basis"], "entry", Infer), pos),
@@ -1504,7 +1496,6 @@
                                              val e = (EVar (["Basis"], "sql_query1", Infer), loc)
                                              val e = (ECApp (e, (CRecord (map (fn nm => (nm, (CUnit, loc))) empties),
                                                                  loc)), loc)
-                                             val e = (EDisjointApp e, loc)
                                              val re = (ERecord [((CName "Distinct", loc),
                                                                  dopt),
                                                                 ((CName "From", loc),