Commit 0afab732 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2002-11-09 18:52:43 by cvscast] Empty log message

Original author: cvscast
Date: 2002-11-09 18:53:51+00:00
parent 8f409a1f
......@@ -161,7 +161,7 @@ let run ppf input =
| Ast.EvalStatement e ->
let (fv,e) = Typer.expr e in
let t = Typer.type_check !typing_env e Types.any true in
Location.dump_loc (Location.output ()) e.Typed.exp_loc;
Location.dump_loc ppf e.Typed.exp_loc;
Format.fprintf ppf "|- %a@\n@." print_norm t;
let v = Eval.eval !eval_env e in
Format.fprintf ppf "=> @[%a@]@\n@." print_value v
......
......@@ -10,7 +10,6 @@ let main (cgi : Netcgi.std_activation) =
and input = Stream.of_string src in
Location.set_source (`String src);
Location.set_viewport `Html;
Location.set_output ppf;
Load_xml.set_auth false;
Cduce.run ppf input;
......@@ -25,7 +24,7 @@ let main (cgi : Netcgi.std_activation) =
<h1>CDuce online prototype</h1>
<pre>" ^ res ^ "</pre>
<form method=get>
<form method=post>
<textarea name=prog cols=80 rows=25></textarea>
<input type=submit>
</form>
......
......@@ -90,10 +90,5 @@ let protect ppf f =
Format.pp_print_flush ppf' ();
let s = Buffer.contents b in
let s = Netencoding.Html.encode_from_latin1 s in
Format.pp_print_string ppf s
Format.fprintf ppf "@[%s@]" s
| _ -> f ppf
let outputr = ref Format.std_formatter
let output () = !outputr
let set_output f = outputr := f
......@@ -12,9 +12,6 @@ val set_source: source -> unit
type viewport = [ `Html | `Text ]
val set_viewport: viewport -> unit
val set_output: Format.formatter -> unit
val output: unit -> Format.formatter
val protect: Format.formatter -> (Format.formatter -> unit) -> unit
val print_loc: Format.formatter -> loc -> unit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment