diff options
Diffstat (limited to 'src/compiler.sml')
-rw-r--r-- | src/compiler.sml | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/compiler.sml b/src/compiler.sml index 15d27b6b..20164b83 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -214,15 +214,24 @@ fun reduce job = if ErrorMsg.anyErrors () then NONE else - SOME (Reduce.reduce (Shake.shake file)) + SOME (Reduce.reduce file) -fun shake job = +fun specialize job = case reduce job of NONE => NONE | SOME file => if ErrorMsg.anyErrors () then NONE else + SOME (Specialize.specialize file) + +fun shake job = + case specialize job of + NONE => NONE + | SOME file => + if ErrorMsg.anyErrors () then + NONE + else SOME (Shake.shake file) fun monoize job = @@ -332,8 +341,8 @@ fun testShake' job = handle CoreEnv.UnboundNamed n => print ("Unbound named " ^ Int.toString n ^ "\n") -fun testTag job = - (case tag job of +fun testReduce job = + (case reduce job of NONE => print "Failed\n" | SOME file => (Print.print (CorePrint.p_file CoreEnv.empty file); @@ -341,8 +350,17 @@ fun testTag job = handle CoreEnv.UnboundNamed n => print ("Unbound named " ^ Int.toString n ^ "\n") -fun testReduce job = - (case reduce job of +fun testSpecialize job = + (case specialize 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 testTag job = + (case tag job of NONE => print "Failed\n" | SOME file => (Print.print (CorePrint.p_file CoreEnv.empty file); |