diff options
author | Alain Frisch <alain@frisch.fr> | 2012-10-17 16:09:38 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2012-10-17 16:09:38 +0000 |
commit | dfa500533af1eb84d7ff901fd2871ece8ce84d79 (patch) | |
tree | a744e50c56487356c018e6c8397ebec91496fd01 /driver/optcompile.ml | |
parent | 3ffcd661001a92cece460da6f2586a05cd485e62 (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/optcompile.ml')
-rw-r--r-- | driver/optcompile.ml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/optcompile.ml b/driver/optcompile.ml index 9bd1d9b05..1c0a540ae 100644 --- a/driver/optcompile.ml +++ b/driver/optcompile.ml @@ -79,6 +79,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 @@ -123,10 +124,12 @@ let implementation ppf sourcefile outputprefix = if !Clflags.print_types then 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) else begin 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_store_implementation modulename +++ print_if ppf Clflags.dump_rawlambda Printlambda.lambda |