diff src/compiler.sml @ 39:02f42e9a1825

Corify removes modules
author Adam Chlipala <adamc@hcoop.net>
date Thu, 19 Jun 2008 12:39:22 -0400
parents d16ef24de78b
children 5c97b7cd912b
line wrap: on
line diff
--- a/src/compiler.sml	Thu Jun 19 10:06:59 2008 -0400
+++ b/src/compiler.sml	Thu Jun 19 12:39:22 2008 -0400
@@ -77,14 +77,23 @@
             SOME (Explify.explify file)
 
 fun corify eenv filename =
-    case elaborate eenv filename of
+    case explify eenv filename of
         NONE => NONE
-      | SOME (file, _) =>
+      | SOME file =>
         if ErrorMsg.anyErrors () then
             NONE
         else
             SOME (Corify.corify file)
 
+fun shake' eenv filename =
+    case corify eenv filename of
+        NONE => NONE
+      | SOME file =>
+        if ErrorMsg.anyErrors () then
+            NONE
+        else
+            SOME (Shake.shake file)
+
 fun reduce eenv filename =
     case corify eenv filename of
         NONE => NONE
@@ -165,6 +174,15 @@
     handle CoreEnv.UnboundNamed n =>
            print ("Unbound named " ^ Int.toString n ^ "\n")
 
+fun testShake' filename =
+    (case shake' ElabEnv.basis filename of
+         NONE => print "Failed\n"
+       | SOME file =>
+         (Print.print (CorePrint.p_file CoreEnv.basis file);
+          print "\n"))
+    handle CoreEnv.UnboundNamed n =>
+           print ("Unbound named " ^ Int.toString n ^ "\n")
+
 fun testReduce filename =
     (case reduce ElabEnv.basis filename of
          NONE => print "Failed\n"