Fix build on 4.00.1 and earlier.

This commit is contained in:
Peter Zotov 2014-07-05 02:17:01 +04:00
parent 2d9285a87f
commit 495336f330
1 changed files with 4 additions and 0 deletions

View File

@ -613,7 +613,9 @@ let rec loop term =
Env.reset_cache_toplevel (); Env.reset_cache_toplevel ();
#endif #endif
if !Clflags.dump_parsetree then Printast.top_phrase pp phrase; if !Clflags.dump_parsetree then Printast.top_phrase pp phrase;
#if ocaml_version > (4, 00, 1)
if !Clflags.dump_source then Pprintast.top_phrase pp phrase; if !Clflags.dump_source then Pprintast.top_phrase pp phrase;
#endif
ignore (Toploop.execute_phrase true pp phrase); ignore (Toploop.execute_phrase true pp phrase);
(* Flush everything. *) (* Flush everything. *)
Format.pp_print_flush Format.std_formatter (); Format.pp_print_flush Format.std_formatter ();
@ -1197,7 +1199,9 @@ let args = Arg.align [
"-require", Arg.String (fun s -> preload := `Packages (UTop.split_words s) :: !preload), "-require", Arg.String (fun s -> preload := `Packages (UTop.split_words s) :: !preload),
"<package> Load this package"; "<package> Load this package";
"-dparsetree", Arg.Set Clflags.dump_parsetree, " Dump OCaml AST after rewriting"; "-dparsetree", Arg.Set Clflags.dump_parsetree, " Dump OCaml AST after rewriting";
#if ocaml_version > (4, 00, 1)
"-dsource", Arg.Set Clflags.dump_source, " Dump OCaml source after rewriting"; "-dsource", Arg.Set Clflags.dump_source, " Dump OCaml source after rewriting";
#endif
] ]
#if ocaml_version >= (4, 01, 0) #if ocaml_version >= (4, 01, 0)