diff: bug fix for NU-Prolog support

Fergus Henderson fjh at cs.mu.oz.au
Tue Mar 25 15:26:00 AEDT 1997


This one-liner is BugFree(TM), so this is just FYI.
It fixes a bug that caused the nightly test on kryten to fail.

-----------------------------------------------------------------------------

Fix a bug in the work-around for the lack of functions in NU-Prolog which
caused the recent changes to library/int.m to break things in NU-Prolog.

library/nc_builtin.nl:
	In the code that uses termExpansion to ignore definitions of
	functions (i.e. clauses for =/2), we need to ignore rules too;
	the previous code only ignored facts.

Index: nc_builtin.nl
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/nc_builtin.nl,v
retrieving revision 1.13
diff -u -5 -r1.13 nc_builtin.nl
--- nc_builtin.nl	1997/03/18 19:58:30	1.13
+++ nc_builtin.nl	1997/03/25 04:15:27
@@ -131,7 +131,8 @@
 % Ignore clauses for functions. 
 % (What else can we do?  NU-Prolog doesn't support them, and it
 % doesn't even have any hooks for extending is/2.)
 
 termExpansion((_ = _), (:- fail)).
+termExpansion(((_ = _) :- _), (:- fail)).
 
 %-----------------------------------------------------------------------------%

-- 
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