Mercurial > urweb
diff src/compiler.sml @ 16:bc7b76ca57e0
Conversion to Core
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 08 Jun 2008 13:59:29 -0400 |
parents | f1c36df29ed7 |
children | 1ab48e37d0ef |
line wrap: on
line diff
--- a/src/compiler.sml Sun Jun 08 13:00:12 2008 -0400 +++ b/src/compiler.sml Sun Jun 08 13:59:29 2008 -0400 @@ -66,7 +66,11 @@ else SOME out end - + +fun corify eenv cenv filename = + case elaborate eenv filename of + NONE => NONE + | SOME (_, file) => SOME (Corify.corify file) fun testParse filename = case parse filename of @@ -84,4 +88,13 @@ handle ElabEnv.UnboundNamed n => print ("Unbound named " ^ Int.toString n ^ "\n") +fun testCorify filename = + (case corify 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