mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 23:35:25 +00:00
Branch: main Estimated hours: 24 Add an analysis which determines the set of modules which are imported but are not used. It also has a more precise analysis of those modules not needed in the interface, as it reports more modules than the current analysis. compiler/unused_imports.m: The module which does the analysis. compiler/make_hlds_passes.m: Record the parent used modules. Factor out the code for adding the module specifiers. compiler/hlds_module.m: Add utility predicates for recording those modules used in the parent modules of the current module and those imports which are in the interface. compiler/options.m: Add the option --warn-unused-imports. By default it's turned off because I have yet to run this analysis on the compiler and fix the modules. compiler/check_hlds.m: compiler/mercury_compile.m: Add the analysis to the compiler. doc/user_guide.texi: Document the new option. compiler/notes/compiler_design.html: Document the new pass.