comparison src/demo.sml @ 1079:d069b193ed6b

Especialize uses a termination measure based on number of arguments introduced
author Adam Chlipala <adamc@hcoop.net>
date Tue, 15 Dec 2009 19:26:52 -0500
parents 93315ac00394
children de48dc2c9ee8
comparison
equal deleted inserted replaced
1078:b9321bcefb42 1079:d069b193ed6b
25 * POSSIBILITY OF SUCH DAMAGE. 25 * POSSIBILITY OF SUCH DAMAGE.
26 *) 26 *)
27 27
28 structure Demo :> DEMO = struct 28 structure Demo :> DEMO = struct
29 29
30 fun make {prefix, dirname, guided} = 30 fun make' {prefix, dirname, guided} =
31 let 31 let
32 val prose = OS.Path.joinDirFile {dir = dirname, 32 val prose = OS.Path.joinDirFile {dir = dirname,
33 file = "prose"} 33 file = "prose"}
34 val inf = TextIO.openIn prose 34 val inf = TextIO.openIn prose
35 35
428 TextIO.output (outf, "\n"); 428 TextIO.output (outf, "\n");
429 TextIO.output (outf, "demo\n"); 429 TextIO.output (outf, "demo\n");
430 430
431 TextIO.closeOut outf; 431 TextIO.closeOut outf;
432 432
433 Compiler.compiler (OS.Path.base fname) 433 let
434 end; 434 val b = Compiler.compile (OS.Path.base fname)
435 435 in
436 TextIO.output (demosOut, "\n</body></html>\n"); 436 TextIO.output (demosOut, "\n</body></html>\n");
437 TextIO.closeOut demosOut; 437 TextIO.closeOut demosOut;
438 438 if b then
439 prettyPrint () 439 prettyPrint ()
440 else
441 ();
442 b
443 end
444 end
440 end 445 end
441 446
447 fun make args = if make' args then
448 ()
449 else
450 OS.Process.exit OS.Process.failure
451
442 end 452 end