Mercurial > urweb
diff src/compiler.sml @ 23:bfa2e9ae4df8
Tree-shaking
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 08 Jun 2008 17:15:09 -0400 |
parents | 1ab48e37d0ef |
children | ea15905e598d |
line wrap: on
line diff
--- a/src/compiler.sml Sun Jun 08 16:08:31 2008 -0400 +++ b/src/compiler.sml Sun Jun 08 17:15:09 2008 -0400 @@ -77,6 +77,11 @@ NONE => NONE | SOME file => SOME (Reduce.reduce file) +fun shake eenv cenv filename = + case reduce eenv cenv filename of + NONE => NONE + | SOME file => SOME (Shake.shake file) + fun testParse filename = case parse filename of NONE => print "Failed\n" @@ -111,4 +116,13 @@ handle CoreEnv.UnboundNamed n => print ("Unbound named " ^ Int.toString n ^ "\n") +fun testShake filename = + (case shake 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