diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-15 19:26:52 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-15 19:26:52 -0500 |
commit | da3dbba11e21149ab08eb95526918a91840783c2 (patch) | |
tree | 5d5334486b71856ca71f54fd6bdaaffeac2e84ff /src/demo.sml | |
parent | 6570b6c0426fc7054d4a0353dd1fab3da7c7a249 (diff) |
Especialize uses a termination measure based on number of arguments introduced
Diffstat (limited to 'src/demo.sml')
-rw-r--r-- | src/demo.sml | 26 |
1 files changed, 18 insertions, 8 deletions
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</body></html>\n"); - TextIO.closeOut demosOut; - - prettyPrint () + let + val b = Compiler.compile (OS.Path.base fname) + in + TextIO.output (demosOut, "\n</body></html>\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 |