From 489ae9fdc1b78eac867252e5088baa632d85f8c9 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 15 Dec 2009 19:26:52 -0500 Subject: Especialize uses a termination measure based on number of arguments introduced --- src/demo.sml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/demo.sml') diff --git a/src/demo.sml b/src/demo.sml index c5480a93..55615173 100644 --- a/src/demo.sml +++ b/src/demo.sml @@ -27,7 +27,7 @@ structure Demo :> DEMO = struct -fun make {prefix, dirname, guided} = +fun make' {prefix, dirname, guided} = let val prose = OS.Path.joinDirFile {dir = dirname, file = "prose"} @@ -430,13 +430,23 @@ fun make {prefix, dirname, guided} = TextIO.closeOut outf; - Compiler.compiler (OS.Path.base fname) - end; - - TextIO.output (demosOut, "\n\n"); - TextIO.closeOut demosOut; - - prettyPrint () + let + val b = Compiler.compile (OS.Path.base fname) + in + TextIO.output (demosOut, "\n\n"); + TextIO.closeOut demosOut; + if b then + prettyPrint () + else + (); + b + end + end end +fun make args = if make' args then + () + else + OS.Process.exit OS.Process.failure + end -- cgit v1.2.3