mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-16 14:25:56 +00:00
Estimated hours taken: 1.5 Branches: main Move the stuff currently in hlds_pred.m that deals with clauses into a new module, hlds_clauses.m. Move the stuff currently in hlds_pred.m that deals with RTTI into a new module, hlds_rtti.m. Move the stuff currently in hlds_module.m that deals with predicate tables into a new module, pred_table.m. These changes make hlds_pred.m and hlds_module.m much more cohesive, but there are no changes in algorithms. compiler/hlds_clauses.m: compiler/hlds_rtti.m: compiler/pred_table.m: New modules as described above. In some cases, fix mixleading or ambiguous predicate names in the process, and convert a few predicates to functions. compiler/hlds_pred.m: compiler/hlds_module.m: Delete the stuff moved to other modules. compiler/*.m: In modules that need the functionality moved a new module, import the new module. It is rare for all the new modules to be needed, and many modules don't need any of the new modules at all. (For example, of the 200+ modules that import hlds_module.m, only about 40 need pred_table.m.) Conform to the few minor changes to e.g. predicate names. compiler/notes/compiler_design.html: Document the new modules.
95 lines
2.8 KiB
Mathematica
95 lines
2.8 KiB
Mathematica
%-----------------------------------------------------------------------------%
|
|
% vim: ft=mercury ts=4 sw=4 et
|
|
%-----------------------------------------------------------------------------%
|
|
% Copyright (C) 2002-2006 The University of Melbourne.
|
|
% This file may only be copied under the terms of the GNU General
|
|
% Public License - see the file COPYING in the Mercury distribution.
|
|
%-----------------------------------------------------------------------------%
|
|
%
|
|
% check_hlds: semantic analysis and error checking (the "front end" HLDS pass).
|
|
|
|
:- module check_hlds.
|
|
:- interface.
|
|
|
|
:- import_module hlds.
|
|
:- import_module mdbcomp.
|
|
:- import_module parse_tree.
|
|
|
|
% :- import_module check_hlds__type_analysis.
|
|
% :- import_module check_hlds__mode_analysis.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
% Type checking
|
|
%:- module type_analysis.
|
|
:- include_module check_typeclass.
|
|
:- include_module post_typecheck.
|
|
:- include_module purity.
|
|
:- include_module type_util.
|
|
:- include_module typecheck.
|
|
:- include_module typecheck_errors.
|
|
:- include_module typecheck_info.
|
|
:- include_module typeclasses.
|
|
%:- end_module type_analysis.
|
|
|
|
% Polymorphism transformation.
|
|
:- include_module clause_to_proc.
|
|
:- include_module polymorphism.
|
|
|
|
% Mode analysis
|
|
%:- module mode_analysis.
|
|
:- include_module delay_info.
|
|
:- include_module inst_match.
|
|
:- include_module inst_util.
|
|
:- include_module mode_constraint_robdd.
|
|
:- include_module mode_constraints.
|
|
:- include_module mode_debug.
|
|
:- include_module mode_errors.
|
|
:- include_module mode_info.
|
|
:- include_module mode_ordering.
|
|
:- include_module mode_util.
|
|
:- include_module modecheck_call.
|
|
:- include_module modecheck_unify.
|
|
:- include_module modes.
|
|
:- include_module unify_proc.
|
|
:- include_module unique_modes.
|
|
|
|
% XXX This doesn't belong here but we don't know where it's home is at
|
|
% the moment.
|
|
%
|
|
:- include_module abstract_mode_constraints.
|
|
:- include_module build_mode_constraints.
|
|
:- include_module mcsolver.
|
|
:- include_module ordering_mode_constraints.
|
|
:- include_module prop_mode_constraints.
|
|
|
|
%:- end_module mode_analysis.
|
|
|
|
% Indexing and determinism analysis
|
|
:- include_module cse_detection.
|
|
:- include_module det_analysis.
|
|
:- include_module det_report.
|
|
:- include_module det_util.
|
|
:- include_module switch_detection.
|
|
|
|
% Stratification.
|
|
:- include_module stratify.
|
|
|
|
% Warnings about simple code
|
|
:- include_module common.
|
|
:- include_module format_call.
|
|
:- include_module simplify.
|
|
|
|
:- include_module goal_path.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
:- import_module libs.
|
|
:- import_module transform_hlds. % for pd_cost, etc.
|
|
|
|
:- end_module check_hlds.
|
|
|
|
%-----------------------------------------------------------------------------%
|