diff lib/basis.urs @ 305:55eedecb6c50

Remove need to mention table name in expressions for UPDATE and DELETE
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 14:30:32 -0400
parents 7204fab29486
children 99e4f39e820d
line wrap: on
line diff
--- a/lib/basis.urs	Sun Sep 07 14:19:05 2008 -0400
+++ b/lib/basis.urs	Sun Sep 07 14:30:32 2008 -0400
@@ -206,19 +206,19 @@
 val insert : fields ::: {Type}
         -> sql_table fields
         -> $(fold (fn nm (t :: Type) acc => [nm] ~ acc =>
-                [nm = sql_exp [T = fields] [] [] t] ++ acc) [] fields)
+                [nm = sql_exp [] [] [] t] ++ acc) [] fields)
         -> dml
 
-val update : changed ::: {Type} -> unchanged ::: {Type} -> changed ~ unchanged
+val update : changed :: {Type} -> unchanged ::: {Type} -> changed ~ unchanged
+        -> sql_table (changed ++ unchanged)
         -> $(fold (fn nm (t :: Type) acc => [nm] ~ acc =>
-                [nm = sql_exp [T = changed ++ unchanged] [] [] t] ++ acc) [] changed)
-        -> sql_table (changed ++ unchanged)
-        -> sql_exp [T = changed ++ unchanged] [] [] bool
+                [nm = sql_exp [] [] (changed ++ unchanged) t] ++ acc) [] changed)
+        -> sql_exp [] [] (changed ++ unchanged) bool
         -> dml
 
 val delete : fields ::: {Type}
         -> sql_table fields
-        -> sql_exp [T = fields] [] [] bool
+        -> sql_exp [] [] fields bool
         -> dml