summaryrefslogtreecommitdiff
path: root/src/demo.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-15 19:26:52 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-15 19:26:52 -0500
commitda3dbba11e21149ab08eb95526918a91840783c2 (patch)
tree5d5334486b71856ca71f54fd6bdaaffeac2e84ff /src/demo.sml
parent6570b6c0426fc7054d4a0353dd1fab3da7c7a249 (diff)
Especialize uses a termination measure based on number of arguments introduced
Diffstat (limited to 'src/demo.sml')
-rw-r--r--src/demo.sml26
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