diff options
Diffstat (limited to 'src/compiler.sml')
-rw-r--r-- | src/compiler.sml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/compiler.sml b/src/compiler.sml index 20eb3ef5..26ff6e2b 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -103,6 +103,15 @@ fun monoize eenv cenv filename = else SOME (Monoize.monoize cenv file) +fun cloconv eenv cenv filename = + case monoize eenv cenv filename of + NONE => NONE + | SOME file => + if ErrorMsg.anyErrors () then + NONE + else + SOME (Cloconv.cloconv file) + fun testParse filename = case parse filename of NONE => print "Failed\n" @@ -155,4 +164,13 @@ fun testMonoize filename = handle MonoEnv.UnboundNamed n => print ("Unbound named " ^ Int.toString n ^ "\n") +fun testCloconv filename = + (case cloconv ElabEnv.basis CoreEnv.basis filename of + NONE => print "Failed\n" + | SOME file => + (Print.print (FlatPrint.p_file FlatEnv.basis file); + print "\n")) + handle FlatEnv.UnboundNamed n => + print ("Unbound named " ^ Int.toString n ^ "\n") + end |