val text = ref ([] : string list)
fun print x = text := x :: (!text)
-
+ fun clear () = text := []
+ fun noOutput () = !text = []
fun output () =
(TextIO.print "Status: 200\nContent-type: text/html\n\n";
TextIO.print (String.concat (List.rev (!text))))
fun summary () =
StringMap.foldli (fn (n, vs, s) => foldl (fn (v, s) => s ^ " VALUE: " ^ v) (s ^ " NAME: " ^ n) vs)
"" (!params)
+
+ val exn = ref (NONE : exn option)
+ fun setExn ex = exn := SOME ex
+ fun getExn () = valOf (!exn)
end
\ No newline at end of file