summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-19 12:39:22 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-19 12:39:22 -0400
commit8e98be7de2dd3db541994aae47aeb45756f60098 (patch)
treebbc63e96871ef6513d974d96311deab9afd4e7a3 /src/compiler.sml
parent371b414262cfb5888759c786e21c66f883ad13c0 (diff)
Corify removes modules
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index 332e2298..8e011d8e 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -77,14 +77,23 @@ fun explify eenv filename =
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 @@ fun testCorify filename =
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"