diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-11-20 11:34:36 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-11-20 11:34:36 -0500 |
commit | a01f4dd530689d29ac7518bb9a8d19b919ef76ac (patch) | |
tree | be1fb9f820200f6d2620e1e597ff809b1f438d29 /src | |
parent | 7b09fa2aca2982038889f960e51d7b1e91a70991 (diff) |
Some demo improvements
Diffstat (limited to 'src')
-rw-r--r-- | src/demo.sig | 2 | ||||
-rw-r--r-- | src/demo.sml | 9 | ||||
-rw-r--r-- | src/main.mlton.sml | 8 |
3 files changed, 13 insertions, 6 deletions
diff --git a/src/demo.sig b/src/demo.sig index 17959000..4bb4a19e 100644 --- a/src/demo.sig +++ b/src/demo.sig @@ -27,6 +27,6 @@ signature DEMO = sig - val make : {prefix : string, dirname : string} -> unit + val make : {prefix : string, dirname : string, guided : bool} -> unit end diff --git a/src/demo.sml b/src/demo.sml index 5ed9da2a..580cd21f 100644 --- a/src/demo.sml +++ b/src/demo.sml @@ -27,7 +27,7 @@ structure Demo :> DEMO = struct -fun make {prefix, dirname} = +fun make {prefix, dirname, guided} = let val prose = OS.Path.joinDirFile {dir = dirname, file = "prose"} @@ -127,7 +127,12 @@ fun make {prefix, dirname} = file = out} val out = TextIO.openOut out - val () = (TextIO.output (out, "<frameset rows=\"50%,*\">\n"); + val () = (TextIO.output (out, "<frameset rows=\""); + TextIO.output (out, if guided then + "*,100" + else + "50%,*"); + TextIO.output (out, "\">\n"); TextIO.output (out, "<frame src=\""); TextIO.output (out, prefix); TextIO.output (out, "/"); diff --git a/src/main.mlton.sml b/src/main.mlton.sml index eb92e39d..1fd4f073 100644 --- a/src/main.mlton.sml +++ b/src/main.mlton.sml @@ -29,7 +29,9 @@ fun doArgs (args, (timing, demo, sources)) = case args of [] => (timing, demo, rev sources) | "-demo" :: prefix :: rest => - doArgs (rest, (timing, SOME prefix, sources)) + doArgs (rest, (timing, SOME (prefix, false), sources)) + | "-guided-demo" :: prefix :: rest => + doArgs (rest, (timing, SOME (prefix, true), sources)) | arg :: rest => let val acc = @@ -52,8 +54,8 @@ val job = val () = case demo of - SOME prefix => - Demo.make {prefix = prefix, dirname = job} + SOME (prefix, guided) => + Demo.make {prefix = prefix, dirname = job, guided = guided} | NONE => if timing then Compiler.time Compiler.toCjrize job |