comparison src/demo.sml @ 383:49c95753bf3b

Small demo prettifications
author Adam Chlipala <adamc@hcoop.net>
date Sun, 19 Oct 2008 14:53:38 -0400
parents aa2edbd47041
children 2a7e7bd7b29f
comparison
equal deleted inserted replaced
382:aa2edbd47041 383:49c95753bf3b
110 ext = SOME "html"} 110 ext = SOME "html"}
111 val out = OS.Path.joinDirFile {dir = outDir, 111 val out = OS.Path.joinDirFile {dir = outDir,
112 file = out} 112 file = out}
113 val out = TextIO.openOut out 113 val out = TextIO.openOut out
114 114
115 val () = (TextIO.output (out, "<frameset rows=\"75%,25%\">\n"); 115 val () = (TextIO.output (out, "<frameset rows=\"50%,*\">\n");
116 TextIO.output (out, "<frame src=\""); 116 TextIO.output (out, "<frame src=\"");
117 TextIO.output (out, prefix); 117 TextIO.output (out, prefix);
118 TextIO.output (out, "/"); 118 TextIO.output (out, "/");
119 TextIO.output (out, name); 119 TextIO.output (out, name);
120 TextIO.output (out, "/main\" name=\"showcase\">\n"); 120 TextIO.output (out, "/main\" name=\"showcase\">\n");
285 case TextIO.inputLine inf of 285 case TextIO.inputLine inf of
286 NONE => () 286 NONE => ()
287 | SOME line => (TextIO.output (out, line); 287 | SOME line => (TextIO.output (out, line);
288 loop ()) 288 loop ())
289 in 289 in
290 TextIO.output (out, "<html><head>\n<title>"); 290 TextIO.output (out, "<html><body>\n\n<pre>");
291 TextIO.output (out, file);
292 TextIO.output (out, "</title>\n</head><body>\n<h1>");
293 TextIO.output (out, file);
294 TextIO.output (out, "</h1>\n\n<pre>");
295 loop (); 291 loop ();
296 TextIO.output (out, "</pre>\n\n</body></html>"); 292 TextIO.output (out, "</pre>\n\n</body></html>");
297 293
298 TextIO.closeIn inf; 294 TextIO.closeIn inf;
299 TextIO.closeOut out 295 TextIO.closeOut out