diff: modules.m bug fix

Fergus Henderson fjh at cs.mu.oz.au
Thu Jan 8 19:10:10 AEDT 1998


Estimated hours taken: 1

compiler/modules.m:
	Fix a bug introduced in stayl's changes to add support for
	`use_module': it was not reading in the `.int2' files
	for modules indirectly imported from `.int' files.

tests/valid/Mmakefile:
tests/valid/module_a.m:
tests/valid/module_b.m:
tests/valid/module_c.m:
tests/valid/module_d.m:
	A regression test for the above-mentioned bug.

cvs diff compiler/modules.m tests/valid/Mmakefile tests/valid/module_a.m tests/valid/module_b.m tests/valid/module_c.m tests/valid/module_d.m
Index: compiler/modules.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/modules.m,v
retrieving revision 1.47
diff -u -r1.47 modules.m
--- modules.m	1998/01/06 23:50:58	1.47
+++ modules.m	1998/01/08 05:31:31
@@ -1595,13 +1595,14 @@
 		globals__io_lookup_bool_option(statistics, Statistics),
 		maybe_report_stats(Statistics),
 
-		{ get_dependencies(Items1, Imports1, _Uses1) },
+		{ get_dependencies(Items1, Imports1, Uses1) },
 		{ list__append(Imports, Imports1, Imports2) },
+		{ list__append(Imports2, Uses1, Imports3) },
 		{ list__append(Items0, Items1, Items2) },
 		{ IndirectImports1 = [Import | IndirectImports0] },
 		{ Module1 = module_imports(ModuleName, DirectImports,
 			IndirectImports1, Items2, Error2) },
-		process_module_short_interfaces(Imports2, Ext, Module1, Module)
+		process_module_short_interfaces(Imports3, Ext, Module1, Module)
 	).
 
 %-----------------------------------------------------------------------------%
Index: tests/valid/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/tests/valid/Mmakefile,v
retrieving revision 1.7
diff -u -r1.7 Mmakefile
--- Mmakefile	1998/01/06 04:16:13	1.7
+++ Mmakefile	1998/01/08 07:27:43
@@ -58,6 +58,10 @@
 	loop_in_disj.m \
 	middle_rec_labels.m \
 	modes_bug.m \
+	module_a.m \
+	module_b.m \
+	module_c.m \
+	module_d.m \
 	mostly_uniq_mode_inf.m \
 	multidet_prune1.m \
 	multidet_test.m \
Index: tests/valid/module_a.m
===================================================================
RCS file: module_a.m
diff -N module_a.m
--- /dev/null	Tue Jan  1 15:00:00 1980
+++ module_a.m	Thu Jan  8 18:26:34 1998
@@ -0,0 +1,5 @@
+:- interface.
+:- use_module module_b.
+
+:- type module_a__foo == module_b__foo.
+
Index: tests/valid/module_b.m
===================================================================
RCS file: module_b.m
diff -N module_b.m
--- /dev/null	Tue Jan  1 15:00:00 1980
+++ module_b.m	Thu Jan  8 18:26:40 1998
@@ -0,0 +1,4 @@
+:- interface.
+:- use_module module_c.
+:- type module_b__foo == module_c__foo.
+
Index: tests/valid/module_c.m
===================================================================
RCS file: module_c.m
diff -N module_c.m
--- /dev/null	Tue Jan  1 15:00:00 1980
+++ module_c.m	Thu Jan  8 18:26:46 1998
@@ -0,0 +1,4 @@
+:- interface.
+:- use_module module_d.
+:- type module_c__foo == module_d__foo.
+
Index: tests/valid/module_d.m
===================================================================
RCS file: module_d.m
diff -N module_d.m
--- /dev/null	Tue Jan  1 15:00:00 1980
+++ module_d.m	Thu Jan  8 18:26:49 1998
@@ -0,0 +1,3 @@
+:- interface.
+:- type module_d__foo == int.
+

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list