diff: term_errors.m bug fixes
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Jan 25 04:01:53 AEDT 1998
Estimated hours taken: 0.5
compiler/term_errors.m:
Fix one bug and work around another.
- The error messages said "... in the recursive call _at_ p/3 at
line 42 ...", instead of "... in the recursive call _to_ p/3 at
line 42 ...".
- When compiling library/relation.m with --trans-opt-int enabled,
one of the sanity checks in the error message printing failed.
I've just commented it out, since getting the error message is
more useful than a call to error/1.
cvs diff compiler/term_errors.m
Index: compiler/term_errors.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/term_errors.m,v
retrieving revision 1.8
diff -u -r1.8 term_errors.m
--- term_errors.m 1998/01/24 05:44:23 1.8
+++ term_errors.m 1998/01/24 16:54:59
@@ -341,9 +341,17 @@
Single, Module, Pieces, no) :-
(
Single = yes(PPId),
- require(unify(PPId, ProcPPId), "not_subset outside this SCC"),
- Pieces1 = ["The", "set", "of", "its", "output", "supplier",
- "variables"]
+ ( PPId = ProcPPId ->
+ Pieces1 = ["The", "set", "of", "its", "output",
+ "supplier", "variables"]
+ ;
+ % XXX this should never happen (but it does)
+ % error("not_subset outside this SCC"),
+ term_errors__describe_one_proc_name(ProcPPId, Module,
+ PPIdPiece),
+ Pieces1 = ["The", "set", "of", "output", "supplier",
+ "variables", "of", PPIdPiece]
+ )
;
Single = no,
term_errors__describe_one_proc_name(ProcPPId, Module,
@@ -365,12 +373,12 @@
term_errors__description(cycle(_StartPPId, CallSites), _, Module, Pieces, no) :-
( CallSites = [DirectCall] ->
term_errors__describe_one_call_site(DirectCall, Module, Site),
- Pieces = ["At", "the", "recursive", "call", "at", Site,
+ Pieces = ["At", "the", "recursive", "call", "to", Site,
"the", "arguments", "are", "not", "guaranteed",
"to", "decrease", "in", "size."]
;
Pieces1 = ["In", "the", "recursive", "cycle",
- "through", "the", "calls", "at"],
+ "through", "the", "calls", "to"],
term_errors__describe_several_call_sites(CallSites, Module,
Sites),
Pieces2 = ["the", "arguments", "are", "not", "guaranteed",
--
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