diff: simplify.m: improvement to stayl's change
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Feb 12 13:06:49 AEDT 1998
Hi Simon,
I noticed that you committed the change that I suggest to simplify.m
without including it in the log message or mailing the diff to
mercury-developers. Tut, tut ;-)
compiler/simplify.m:
A small improvement to stayl's previous change to
append `fail' at the end of conjunctions that can't
succeed (to preserve mode correctness): when checking whether a
goal is `fail' use unification, rather than fail_goal/1.
fail_goal/1 is intended for generating fail goals, not for
testing for them.
Also fix a spelling error in a comment.
cvs diff compiler/simplify.m
Index: compiler/simplify.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/simplify.m,v
retrieving revision 1.53
diff -u -r1.53 simplify.m
--- simplify.m 1998/02/12 01:17:44 1.53
+++ simplify.m 1998/02/12 02:05:51
@@ -886,12 +886,12 @@
simplify__conjoin_goal_and_rev_goal_list(Goal1,
RevGoals0, RevGoals1),
- ( (fail_goal(Goal1) ; Goals0 = []) ->
+ ( (Goal1 = disj([], _) - _ ; Goals0 = []) ->
RevGoals = RevGoals1
;
% We insert an explicit failure at the end
% of the non-succeeding conjunction. This
- % is necessary, since the unreachablility of
+ % is necessary, since the unreachability of
% the instmap could have been derived using
% inferred determinism information. Without the
% explicit fail goal, mode errors could result if mode
--
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