diff src/compiler.sml @ 110:3739af9e727a

Starting with closure links
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Jul 2008 11:43:57 -0400
parents 813e5a52063d
children 6c88b44efcfa
line wrap: on
line diff
--- a/src/compiler.sml	Sun Jul 13 10:17:06 2008 -0400
+++ b/src/compiler.sml	Sun Jul 13 11:43:57 2008 -0400
@@ -196,8 +196,17 @@
         else
             SOME (Shake.shake file)
 
+fun tag job =
+    case shake' job of
+        NONE => NONE
+      | SOME file =>
+        if ErrorMsg.anyErrors () then
+            NONE
+        else
+            SOME (Tag.tag file)
+
 fun reduce job =
-    case corify job of
+    case tag job of
         NONE => NONE
       | SOME file =>
         if ErrorMsg.anyErrors () then
@@ -285,6 +294,15 @@
     handle CoreEnv.UnboundNamed n =>
            print ("Unbound named " ^ Int.toString n ^ "\n")
 
+fun testTag job =
+    (case tag job of
+         NONE => print "Failed\n"
+       | SOME file =>
+         (Print.print (CorePrint.p_file CoreEnv.empty file);
+          print "\n"))
+    handle CoreEnv.UnboundNamed n =>
+           print ("Unbound named " ^ Int.toString n ^ "\n")
+
 fun testReduce job =
     (case reduce job of
          NONE => print "Failed\n"