summaryrefslogtreecommitdiffstats
path: root/driver/compile.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2012-10-17 16:09:38 +0000
committerAlain Frisch <alain@frisch.fr>2012-10-17 16:09:38 +0000
commitdfa500533af1eb84d7ff901fd2871ece8ce84d79 (patch)
treea744e50c56487356c018e6c8397ebec91496fd01 /driver/compile.ml
parent3ffcd661001a92cece460da6f2586a05cd485e62 (diff)
#5741: make Pprintast available from the command-line (-dsource).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13025 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver/compile.ml')
-rw-r--r--driver/compile.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/compile.ml b/driver/compile.ml
index c3873d32f..f1aaaa9e7 100644
--- a/driver/compile.ml
+++ b/driver/compile.ml
@@ -82,6 +82,7 @@ let interface ppf sourcefile outputprefix =
let ast =
Pparse.file ppf inputfile Parse.interface ast_intf_magic_number in
if !Clflags.dump_parsetree then fprintf ppf "%a@." Printast.interface ast;
+ if !Clflags.dump_source then fprintf ppf "%a@." Pprintast.signature ast;
let tsg = Typemod.transl_signature initial_env ast in
let sg = tsg.sig_type in
if !Clflags.print_types then
@@ -121,6 +122,7 @@ let implementation ppf sourcefile outputprefix =
try ignore(
Pparse.file ppf inputfile Parse.implementation ast_impl_magic_number
++ print_if ppf Clflags.dump_parsetree Printast.implementation
+ ++ print_if ppf Clflags.dump_source Pprintast.structure
++ Typemod.type_implementation sourcefile outputprefix modulename env);
Warnings.check_fatal ();
Pparse.remove_preprocessed inputfile;
@@ -135,6 +137,7 @@ let implementation ppf sourcefile outputprefix =
try
Pparse.file ppf inputfile Parse.implementation ast_impl_magic_number
++ print_if ppf Clflags.dump_parsetree Printast.implementation
+ ++ print_if ppf Clflags.dump_source Pprintast.structure
++ Typemod.type_implementation sourcefile outputprefix modulename env
++ Translmod.transl_implementation modulename
++ print_if ppf Clflags.dump_rawlambda Printlambda.lambda