trivial diff: handle nested conjunctions in all_negated/2
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Jun 21 18:23:19 AEST 1998
compiler/make_hlds.m:
Add some code to handle nested conjunctions in all_negated/2
(just in case...).
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.267
diff -u -r1.267 make_hlds.m
--- make_hlds.m 1998/06/12 07:05:28 1.267
+++ make_hlds.m 1998/06/21 08:16:29
@@ -3671,6 +3671,11 @@
all_negated([], []).
all_negated([not(Goal) - _ | NegatedGoals], [Goal | Goals]) :-
all_negated(NegatedGoals, Goals).
+% nested conjunctions shouldn't occur here anyway, but just in case...
+all_negated([conj(NegatedConj) - _GoalInfo | NegatedGoals], Goals) :-
+ all_negated(NegatedConj, Goals1),
+ all_negated(NegatedGoals, Goals2),
+ list__append(Goals1, Goals2, Goals).
%-----------------------------------------------------------------------------
--
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