comparison src/demo.sml @ 501:7ef4b2911b09

Some demo improvements
author Adam Chlipala <adamc@hcoop.net>
date Thu, 20 Nov 2008 11:34:36 -0500
parents c5a3d223f157
children 8875ff2e85dc
comparison
equal deleted inserted replaced
500:581554f8e642 501:7ef4b2911b09
25 * POSSIBILITY OF SUCH DAMAGE. 25 * POSSIBILITY OF SUCH DAMAGE.
26 *) 26 *)
27 27
28 structure Demo :> DEMO = struct 28 structure Demo :> DEMO = struct
29 29
30 fun make {prefix, dirname} = 30 fun make {prefix, dirname, guided} =
31 let 31 let
32 val prose = OS.Path.joinDirFile {dir = dirname, 32 val prose = OS.Path.joinDirFile {dir = dirname,
33 file = "prose"} 33 file = "prose"}
34 val inf = TextIO.openIn prose 34 val inf = TextIO.openIn prose
35 35
125 ext = SOME "html"} 125 ext = SOME "html"}
126 val out = OS.Path.joinDirFile {dir = outDir, 126 val out = OS.Path.joinDirFile {dir = outDir,
127 file = out} 127 file = out}
128 val out = TextIO.openOut out 128 val out = TextIO.openOut out
129 129
130 val () = (TextIO.output (out, "<frameset rows=\"50%,*\">\n"); 130 val () = (TextIO.output (out, "<frameset rows=\"");
131 TextIO.output (out, if guided then
132 "*,100"
133 else
134 "50%,*");
135 TextIO.output (out, "\">\n");
131 TextIO.output (out, "<frame src=\""); 136 TextIO.output (out, "<frame src=\"");
132 TextIO.output (out, prefix); 137 TextIO.output (out, prefix);
133 TextIO.output (out, "/"); 138 TextIO.output (out, "/");
134 TextIO.output (out, name); 139 TextIO.output (out, name);
135 TextIO.output (out, "/main\" name=\"showcase\">\n"); 140 TextIO.output (out, "/main\" name=\"showcase\">\n");