summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-08 15:47:44 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-08 15:47:44 -0400
commite18863bcabc5d185b7fe1fc750bdf0bbdb5a4f78 (patch)
tree180c8271605929d6c902c4dda9b8b756ff0e1fda /src/compiler.sml
parentb0bf85209e8ddd4937393908d953f451556e73e9 (diff)
Some con reducing
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 51fef453..28b92ac8 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -72,6 +72,11 @@ fun corify eenv cenv filename =
NONE => NONE
| SOME (_, file) => SOME (Corify.corify file)
+fun reduce eenv cenv filename =
+ case corify eenv cenv filename of
+ NONE => NONE
+ | SOME file => SOME (Reduce.reduce file)
+
fun testParse filename =
case parse filename of
NONE => print "Failed\n"
@@ -97,4 +102,13 @@ fun testCorify filename =
handle CoreEnv.UnboundNamed n =>
print ("Unbound named " ^ Int.toString n ^ "\n")
+fun testReduce filename =
+ (case reduce 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