diff src/compiler.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 e4baf03a3a64
children 0236d9412ad2
line wrap: on
line diff
--- a/src/compiler.sml	Tue Sep 02 16:18:05 2008 -0400
+++ b/src/compiler.sml	Tue Sep 02 17:31:45 2008 -0400
@@ -93,15 +93,17 @@
               end
 }
 
-fun run (tr : ('src, 'dst) transform) = #func tr
+fun run (tr : ('src, 'dst) transform) x = (ErrorMsg.resetErrors ();
+                                           #func tr x)
 
 fun runPrint (tr : ('src, 'dst) transform) input =
-    case #func tr input of
-        NONE => print "Failure\n"
-      | SOME v =>
-        (print "Success\n";
-         Print.print (#print tr v);
-         print "\n")
+    (ErrorMsg.resetErrors ();
+     case #func tr input of
+         NONE => print "Failure\n"
+       | SOME v =>
+         (print "Success\n";
+          Print.print (#print tr v);
+          print "\n"))
 
 fun time (tr : ('src, 'dst) transform) input =
     let