mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-16 06:14:59 +00:00
Estimated hours taken: 8 Branches: main Represent ":- module" and ":- end_module" items using purpose-specific kinds of items, instead of as part of the generic "module_defn" item kind. This is in preparation for a diff that would return submodules as separate entities in their own right, instead of as an embedded sequence of items that happen to start with a :- module item and end with an optional :- end_module item. Also as preparation, make missing a ":- module" declaration at the start of a source file an error instead of a warning. compiler/prog_item.m: Change the type representing items. compiler/prog_io.m: Conform to the change above, make missing module declarations into an error, and simplify some code. compiler/equiv_type.m: compiler/make_hlds_passes.m: compiler/mercury_to_mercury.m: compiler/module_qual.m: compiler/modules.m: compiler/recompilation.check.m: compiler/recompilation.version.m: Conform to the change above. Where relevant, turn chains of if-then-elses on item types into switches. compiler/inst.m: Make the module name in the module declaration match the module name. tests/invalid/big_test.err_exp: tests/invalid/errors.err_exp: tests/invalid/typeclass_test_1.err_exp: Update the expected error messages. tests/valid/inhibit_warn_test.m: To keep this test case valid, don't omit the ":- module" declaration.
10 lines
450 B
Mathematica
10 lines
450 B
Mathematica
%-----------------------------------------------------------------------------%
|
|
% Copyright (C) 1997, 1999-2000, 2002-2005, 2009 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 former contents of this file are now prog_data.m.
|
|
|
|
:- module (inst).
|