trivial diff: nested module bug fix
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Nov 11 09:23:18 AEDT 1998
Estimated hours taken: 0.5
compiler/make_hlds.m:
Fix a bug introduced by my earlier change to add the new alternative
`exported_to_submodules' to the `import_status' type: I forgot to add
a clause for that alternative to the predicate `combine_status_2/3'.
(The compiler didn't complain because the pred was semidet.)
tests/valid/Mmakefile:
tests/valid/nested_mod_type_bug.m:
Regression test.
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.276
diff -u -r1.276 make_hlds.m
--- make_hlds.m 1998/11/02 09:49:02 1.276
+++ make_hlds.m 1998/11/10 21:56:05
@@ -1084,6 +1084,7 @@
combine_status_2(local, Status2, Status) :-
combine_status_local(Status2, Status).
combine_status_2(exported, _Status2, exported).
+combine_status_2(exported_to_submodules, _Status2, exported_to_submodules).
combine_status_2(opt_imported, _Status2, opt_imported).
combine_status_2(abstract_imported, Status2, Status) :-
combine_status_abstract_imported(Status2, Status).
Index: tests/valid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/valid/Mmakefile,v
retrieving revision 1.25
diff -u -r1.25 Mmakefile
--- Mmakefile 1998/09/21 11:27:18 1.25
+++ Mmakefile 1998/11/10 21:55:36
@@ -76,6 +76,7 @@
multidet_prune1.m \
multidet_test.m \
nasty_func_test.m \
+ nested_mod_type_bug.m \
nondet_live.m \
pred_with_no_modes.m \
qualified_cons_id.m \
Index: tests/valid/nested_mod_type_bug.m
===================================================================
RCS file: nested_mod_type_bug.m
diff -N nested_mod_type_bug.m
--- /dev/null Wed Nov 11 08:54:23 1998
+++ nested_mod_type_bug.m Wed Nov 11 08:55:20 1998
@@ -0,0 +1,13 @@
+:- module nested_mod_type_bug.
+:- interface.
+
+ :- module nested.
+ :- interface.
+ :- type blah == int.
+ :- end_module nested.
+
+:- type foo(T).
+
+:- implementation.
+
+:- type foo(T) ---> f(T).
--
Fergus Henderson <fjh at cs.mu.oz.au> | "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh> | but source code lives forever"
PGP: finger fjh at 128.250.37.3 | -- leaked Microsoft memo.
More information about the developers
mailing list