comparison src/compiler.sml @ 39:02f42e9a1825

Corify removes modules
author Adam Chlipala <adamc@hcoop.net>
date Thu, 19 Jun 2008 12:39:22 -0400
parents d16ef24de78b
children 5c97b7cd912b
comparison
equal deleted inserted replaced
38:d16ef24de78b 39:02f42e9a1825
75 NONE 75 NONE
76 else 76 else
77 SOME (Explify.explify file) 77 SOME (Explify.explify file)
78 78
79 fun corify eenv filename = 79 fun corify eenv filename =
80 case elaborate eenv filename of 80 case explify eenv filename of
81 NONE => NONE 81 NONE => NONE
82 | SOME (file, _) => 82 | SOME file =>
83 if ErrorMsg.anyErrors () then 83 if ErrorMsg.anyErrors () then
84 NONE 84 NONE
85 else 85 else
86 SOME (Corify.corify file) 86 SOME (Corify.corify file)
87
88 fun shake' eenv filename =
89 case corify eenv filename of
90 NONE => NONE
91 | SOME file =>
92 if ErrorMsg.anyErrors () then
93 NONE
94 else
95 SOME (Shake.shake file)
87 96
88 fun reduce eenv filename = 97 fun reduce eenv filename =
89 case corify eenv filename of 98 case corify eenv filename of
90 NONE => NONE 99 NONE => NONE
91 | SOME file => 100 | SOME file =>
156 handle ExplEnv.UnboundNamed n => 165 handle ExplEnv.UnboundNamed n =>
157 print ("Unbound named " ^ Int.toString n ^ "\n") 166 print ("Unbound named " ^ Int.toString n ^ "\n")
158 167
159 fun testCorify filename = 168 fun testCorify filename =
160 (case corify ElabEnv.basis filename of 169 (case corify ElabEnv.basis filename of
170 NONE => print "Failed\n"
171 | SOME file =>
172 (Print.print (CorePrint.p_file CoreEnv.basis file);
173 print "\n"))
174 handle CoreEnv.UnboundNamed n =>
175 print ("Unbound named " ^ Int.toString n ^ "\n")
176
177 fun testShake' filename =
178 (case shake' ElabEnv.basis filename of
161 NONE => print "Failed\n" 179 NONE => print "Failed\n"
162 | SOME file => 180 | SOME file =>
163 (Print.print (CorePrint.p_file CoreEnv.basis file); 181 (Print.print (CorePrint.p_file CoreEnv.basis file);
164 print "\n")) 182 print "\n"))
165 handle CoreEnv.UnboundNamed n => 183 handle CoreEnv.UnboundNamed n =>