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
commit489ae9fdc1b78eac867252e5088baa632d85f8c9 (patch)
tree5d5334486b71856ca71f54fd6bdaaffeac2e84ff /src/demo.sml
parent2513e44c4a1e4dc2ad8f0ab817d4f51aecc3660f (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