mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-12 20:34:19 +00:00
Packages are modules whose only job is to serve as a container for submodules. Modules like top_level.m, hlds.m, parse_tree.m and ll_backend.m are packages in this (informal) sense. Besides the include_module declarations for their submodules, most of the packages in the compiler used to import some modules, mostly other packages whose component modules their submodules may need. For example, ll_backend.m used to import parse_tree.m. This meant that modules in the ll_backend package did not have to import parse_tree.m before importing modules in the parse_tree package. However, this had a price. When we add a new module to the parse_tree package, parse_tree.int would change, and this would require the recompilation of ALL the modules in the ll_backend package, even the ones that did NOT import ANY of the modules in the parse_tree package. This happened even at one remove. Pretty much all modules in every one of the backend have to import one or more modules in the hlds package, and they therefore have import hlds.m. Since hlds.m imported transform_hlds.m, any addition of a new middle pass to the transform_hlds package required the recompilation of all backend modules, even in the usual case of the two having nothing to do with each other. This diff removes all import_module declarations from the packages, and replaces them with import_module declarations in the modules that need them. This includes only a SUBSET of their child modules and of the non-child modules that import them.
36 lines
1.2 KiB
Mathematica
36 lines
1.2 KiB
Mathematica
%-----------------------------------------------------------------------------%
|
|
% vim: ft=mercury ts=4 sw=4 et
|
|
%-----------------------------------------------------------------------------%
|
|
% Copyright (C) 2007 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.
|
|
%-----------------------------------------------------------------------------%
|
|
%
|
|
% The Erlang back-end.
|
|
%
|
|
% This package includes
|
|
% - the ELDS data structure, which is an abstract
|
|
% representation of a subset of the Erlang language;
|
|
% - the ELDS code generator, which converts HLDS to ELDS;
|
|
% - the Erlang back-end which writes out the ELDS as Erlang code.
|
|
%
|
|
|
|
:- module erl_backend.
|
|
:- interface.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
:- include_module elds.
|
|
|
|
:- include_module erl_code_gen.
|
|
:- include_module erl_call_gen.
|
|
:- include_module erl_unify_gen.
|
|
:- include_module erl_code_util.
|
|
:- include_module erl_rtti.
|
|
|
|
:- include_module elds_to_erlang.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
:- end_module erl_backend.
|
|
%-----------------------------------------------------------------------------%
|