diff options
| author | Alain Frisch <alain@frisch.fr> | 2011-12-21 16:35:36 +0000 |
|---|---|---|
| committer | Alain Frisch <alain@frisch.fr> | 2011-12-21 16:35:36 +0000 |
| commit | 1061c39aac71ab7aaae7da059071487ddcddb5c8 (patch) | |
| tree | f21fb0de0abc350a2b01e7836ae75a0e2c3c2235 /driver/compile.ml | |
| parent | debacec7760ce1a61a0b3bd8b12f0a73ac1251ea (diff) | |
| download | ocaml-1061c39aac71ab7aaae7da059071487ddcddb5c8.tar.gz | |
Check for unused value declaration in interface files.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11928 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver/compile.ml')
| -rw-r--r-- | driver/compile.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/driver/compile.ml b/driver/compile.ml index 33a198ed83..4a75b9d185 100644 --- a/driver/compile.ml +++ b/driver/compile.ml @@ -83,7 +83,12 @@ 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; - let sg = Typemod.transl_signature (initial_env()) ast in + Typecore.reset_delayed_checks (); + let env = initial_env () in + let sg = Typemod.transl_signature env ast in + if Warnings.is_active (Warnings.Unused_value_declaration "") then + ignore (Includemod.signatures env sg sg); + Typecore.force_delayed_checks (); if !Clflags.print_types then fprintf std_formatter "%a@." Printtyp.signature (Typemod.simplify_signature sg); |
