summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-08 17:15:09 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-08 17:15:09 -0400
commitbc3d86e857b3b5884aba5b61d7bedb40e76e6616 (patch)
tree11a3ee7fb0a09f4b89b8ee195cc96b50850df233 /src/compiler.sml
parentd52cd67621a27bbd27888c170c843fafb552658c (diff)
Tree-shaking
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index 28b92ac8..ce6f376e 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -77,6 +77,11 @@ fun reduce eenv cenv filename =
NONE => NONE
| SOME file => SOME (Reduce.reduce file)
+fun shake eenv cenv filename =
+ case reduce eenv cenv filename of
+ NONE => NONE
+ | SOME file => SOME (Shake.shake file)
+
fun testParse filename =
case parse filename of
NONE => print "Failed\n"
@@ -111,4 +116,13 @@ fun testReduce filename =
handle CoreEnv.UnboundNamed n =>
print ("Unbound named " ^ Int.toString n ^ "\n")
+fun testShake filename =
+ (case shake ElabEnv.basis CoreEnv.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")
+
end