diff src/tag.sml @ 280:fdd7a698be01

Compiling a parametrized query the inefficient way
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Sep 2008 17:31:45 -0400
parents 3bbed533fbd2
children 9117a7bf229c
line wrap: on
line diff
--- a/src/tag.sml	Tue Sep 02 16:18:05 2008 -0400
+++ b/src/tag.sml	Tue Sep 02 17:31:45 2008 -0400
@@ -216,7 +216,9 @@
                                                                                  ((EApp (app, (ERel n, loc)), loc),
                                                                                   n - 1))
                                                                              ((ENamed f, loc), length args - 1) args
+                                                        val app = (EApp (app, (ERecord [], loc)), loc)
                                                         val body = (EWrite app, loc)
+                                                        val t = (TFun (unit, unit), loc)
                                                         val (abs, _, t) = foldr (fn (t, (abs, n, rest)) =>
                                                                                     ((EAbs ("x" ^ Int.toString n,
                                                                                             t,
@@ -224,7 +226,7 @@
                                                                                             abs), loc),
                                                                                      n + 1,
                                                                                      (TFun (t, rest), loc)))
-                                                                                (body, 0, unit) args
+                                                                                (body, 0, t) args
                                                     in
                                                         (abs, t)
                                                     end