Permalink
Browse files

Expose a Typemod.type_interface (currently an alias of Typemod.transl…

…_signature) by symmetry with type_implementation.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14759 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
1 parent 36b25ec commit f0ef09de26c9c5dd6ac73b79309b016b3c5deaa2 @alainfrisch alainfrisch committed May 7, 2014
Showing with 8 additions and 3 deletions.
  1. +1 −1 driver/compile.ml
  2. +1 −1 driver/optcompile.ml
  3. +1 −1 ocamldoc/odoc_analyse.ml
  4. +3 −0 typing/typemod.ml
  5. +2 −0 typing/typemod.mli
View
2 driver/compile.ml
@@ -31,7 +31,7 @@ let interface ppf sourcefile outputprefix =
let ast = Pparse.parse_interface ppf sourcefile 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 tsg = Typemod.type_interface initial_env ast in
if !Clflags.dump_typedtree then fprintf ppf "%a@." Printtyped.interface tsg;
let sg = tsg.sig_type in
if !Clflags.print_types then
View
2 driver/optcompile.ml
@@ -32,7 +32,7 @@ let interface ppf sourcefile outputprefix =
let ast = Pparse.parse_interface ppf sourcefile 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 tsg = Typemod.type_interface initial_env ast in
if !Clflags.dump_typedtree then fprintf ppf "%a@." Printtyped.interface tsg;
let sg = tsg.sig_type in
if !Clflags.print_types then
View
2 ocamldoc/odoc_analyse.ml
@@ -93,7 +93,7 @@ let process_interface_file ppf sourcefile =
Env.set_unit_name modulename;
let inputfile = preprocess sourcefile in
let ast = Pparse.file Format.err_formatter inputfile Parse.interface ast_intf_magic_number in
- let sg = Typemod.transl_signature (initial_env()) ast in
+ let sg = Typemod.type_interface (initial_env()) ast in
Warnings.check_fatal ();
(ast, sg, inputfile)
View
3 typing/typemod.ml
@@ -1618,6 +1618,9 @@ let save_signature modname tsg outputprefix source_file initial_env cmi =
Cmt_format.save_cmt (outputprefix ^ ".cmti") modname
(Cmt_format.Interface tsg) (Some source_file) initial_env (Some cmi)
+let type_interface env sg =
+ transl_signature env sg
+
(* "Packaging" of several compilation units into one unit
having them as sub-modules. *)
View
2 typing/typemod.mli
@@ -26,6 +26,8 @@ val type_toplevel_phrase:
val type_implementation:
string -> string -> string -> Env.t -> Parsetree.structure ->
Typedtree.structure * Typedtree.module_coercion
+val type_interface:
+ Env.t -> Parsetree.signature -> Typedtree.signature
val transl_signature:
Env.t -> Parsetree.signature -> Typedtree.signature
val check_nongen_schemes:

0 comments on commit f0ef09d

Please sign in to comment.