comparison src/compiler.sml @ 134:18299126a343

MonoShake
author Adam Chlipala <adamc@hcoop.net>
date Thu, 17 Jul 2008 13:12:16 -0400
parents 55d8cfa4d024
children b1cfe49ce692
comparison
equal deleted inserted replaced
133:55d8cfa4d024 134:18299126a343
257 if ErrorMsg.anyErrors () then 257 if ErrorMsg.anyErrors () then
258 NONE 258 NONE
259 else 259 else
260 SOME (MonoReduce.reduce file) 260 SOME (MonoReduce.reduce file)
261 261
262 fun mono_shake job =
263 case mono_reduce job of
264 NONE => NONE
265 | SOME file =>
266 if ErrorMsg.anyErrors () then
267 NONE
268 else
269 SOME (MonoShake.shake file)
270
262 fun mono_opt job = 271 fun mono_opt job =
263 case mono_reduce job of 272 case mono_shake job of
264 NONE => NONE 273 NONE => NONE
265 | SOME file => 274 | SOME file =>
266 if ErrorMsg.anyErrors () then 275 if ErrorMsg.anyErrors () then
267 NONE 276 NONE
268 else 277 else
375 handle MonoEnv.UnboundNamed n => 384 handle MonoEnv.UnboundNamed n =>
376 print ("Unbound named " ^ Int.toString n ^ "\n") 385 print ("Unbound named " ^ Int.toString n ^ "\n")
377 386
378 fun testMono_reduce job = 387 fun testMono_reduce job =
379 (case mono_reduce job of 388 (case mono_reduce job of
389 NONE => print "Failed\n"
390 | SOME file =>
391 (Print.print (MonoPrint.p_file MonoEnv.empty file);
392 print "\n"))
393 handle MonoEnv.UnboundNamed n =>
394 print ("Unbound named " ^ Int.toString n ^ "\n")
395
396 fun testMono_shake job =
397 (case mono_shake job of
380 NONE => print "Failed\n" 398 NONE => print "Failed\n"
381 | SOME file => 399 | SOME file =>
382 (Print.print (MonoPrint.p_file MonoEnv.empty file); 400 (Print.print (MonoPrint.p_file MonoEnv.empty file);
383 print "\n")) 401 print "\n"))
384 handle MonoEnv.UnboundNamed n => 402 handle MonoEnv.UnboundNamed n =>