[m-rev.] diff: remove support for NU-Prolog when declarations

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Sep 29 02:46:01 AEST 2004


Estimated hours taken: 0.5
Branches: main

Remove support for NU-Prolog style `when' declarations.
These have been deprecated for some time.

NEWS
	Mention this change.

compiler/prog_data.m:
compiler/prog_io.m:
	Remove remaining support for when declarations.

tests/general/interpreter.m:
tests/valid/lazy_list.m:
	Remove some old when declarations.

Julien.

Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.342
diff -u -r1.342 NEWS
--- NEWS	28 Sep 2004 02:05:38 -0000	1.342
+++ NEWS	28 Sep 2004 16:36:51 -0000
@@ -66,6 +66,9 @@

 Changes to the Mercury language:

+* The deprecated support for NU-Prolog style `when' declarations has been
+  removed.
+
 * We have experimental support for user-defined constrained types, as
   documented in the reference manual section on "Solver types".  Variables
   of a constrained type can have constraints placed upon them before they
Index: compiler/prog_data.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.114
diff -u -r1.114 prog_data.m
--- compiler/prog_data.m	5 Sep 2004 23:52:38 -0000	1.114
+++ compiler/prog_data.m	28 Sep 2004 07:16:58 -0000
@@ -155,9 +155,8 @@
 	;	nothing(
 			nothing_maybe_warning	:: maybe(item_warning)
 		).
-		% used for items that should be ignored (e.g.
-		% NU-Prolog `when' declarations, which are silently
-		% ignored for backwards compatibility).
+		% used for items that should be ignored (for the
+		% purposes of backwards compatibility etc)

 	% indicates the type of information the compiler should get from the
 	% declaration's clause
Index: compiler/prog_io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.230
diff -u -r1.230 prog_io.m
--- compiler/prog_io.m	10 Sep 2004 08:01:33 -0000	1.230
+++ compiler/prog_io.m	28 Sep 2004 07:17:23 -0000
@@ -1279,24 +1279,6 @@
 	),
 	check_no_attributes(Result1, Attributes, Result).

-	% NU-Prolog `when' declarations used to be silently ignored for
-	% backwards compatibility.  We now issue a warning that they
-	% are deprecated.  We should eventually drop support for them
-	% entirely.
-process_decl(_ModuleName, _VarSet, "when", [Goal, _Cond], Attributes,
-		Result) :-
-	( Goal = term__functor(_, _, Context0) ->
-		Context = Context0
-	;
-		term__context_init(Context)
-	),
-	dummy_term_with_context(Context, DummyTerm),
-	Result0 = ok(nothing(yes(item_warning(no,
-			"NU-Prolog `when' declarations are deprecated",
-			DummyTerm
-		)))),
-	check_no_attributes(Result0, Attributes, Result).
-
 process_decl(ModuleName, VarSet, "pragma", Pragma, Attributes, Result):-
 	parse_pragma(ModuleName, VarSet, Pragma, Result0),
 	check_no_attributes(Result0, Attributes, Result).
Index: tests/general/interpreter.m
===================================================================
RCS file: /home/mercury1/repository/tests/general/interpreter.m,v
retrieving revision 1.6
diff -u -r1.6 interpreter.m
--- tests/general/interpreter.m	13 Mar 1996 07:30:36 -0000	1.6
+++ tests/general/interpreter.m	28 Sep 2004 16:18:47 -0000
@@ -192,8 +192,6 @@
 :- pred unify(term, term, varset, varset).
 :- mode unify(in, in, in, out) is semidet.

-:- unify(X, Y, _, _) when X and Y.		% NU-Prolog indexing
-
 unify(term__variable(X), term__variable(Y), VarSet0, VarSet) :-
 	(
 		varset__search_var(VarSet0, X, BindingOfX)
Index: tests/valid/lazy_list.m
===================================================================
RCS file: /home/mercury1/repository/tests/valid/lazy_list.m,v
retrieving revision 1.3
diff -u -r1.3 lazy_list.m
--- tests/valid/lazy_list.m	14 Jul 2004 05:39:14 -0000	1.3
+++ tests/valid/lazy_list.m	28 Sep 2004 07:18:26 -0000
@@ -543,8 +543,6 @@
 :- pred lazy_list__zip2(lazy_list(T), lazy_list(T), lazy_list(T)).
 :- mode lazy_list__zip2(in(lazy_list), in(lazy_list), out(lazy_list)) is det.

-:- lazy_list__zip2(_, Bs, _) when Bs. % NU-Prolog indexing
-
 lazy_list__zip2(As, [], As).
 lazy_list__zip2(As, [B|Bs], [B|Cs]) :-
 	lazy_list__zip(As, Bs, Cs).

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list