diff options
Diffstat (limited to 'src/compiler.sml')
-rw-r--r-- | src/compiler.sml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/compiler.sml b/src/compiler.sml index 1f063633..e54fe5b4 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -196,8 +196,17 @@ fun shake' job = 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 @@ fun testShake' job = 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" |