for review: remove Prolog support [round 2]

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Mar 14 16:36:36 AEDT 1999


Rather than including a relative diff, I have just
ordered the new full diff so that all the changes that
are new in this round are at the start of the diff.
For the log message, I've used change bars ("|") to mark
new stuff.

If I don't get any negative comments within a couple of days,
then I'll go ahead and commit this.

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

Estimated hours taken: 4

Remove support for NU-Prolog and SICStus Prolog.

The reasons for this are:
(a) We now have a proper working debugger, so we don't need to use
    NU-Prolog or SICStus Prolog for debugging.
(b) The Prolog support was only ever a hack, not a proper solution;
    Mercury language features like functions or mode reordering
    were never supported.
(c) It was a maintenance problem.

 | compiler/make_hlds.m:
 | 	Warn that NU-Prolog `when' declarations are deprecated.
 | 
 | compiler/prog_io.m:
 | 	Update a comment to say that NU-Prolog `when' declarations
 | 	are now deprecated.
 | 
 | library/*.m:
 | 	Delete `when' declarations.
 | 
 | tools/bootcheck:
 | 	Delete the options for testing using SICStus Prolog.

configure.in:
bindist/bindist.configure.in:
	Delete the autoconf tests for NU-Prolog and SICStus Prolog.
	Delete the stuff for generating the NU-Prolog and SICStus Prolog
	scripts.

library/Mmakefile:
	Delete the rules for building NU-Prolog and SICStus Prolog stuff.

library/library.nu.nl.in:
library/swi_*.m:
library/*.nu.nl:
	Delete these files.

scripts/mnc.in:
scripts/mnp.in:
scripts/mnl.in:
scripts/msc.in:
scripts/msl.in:
scripts/msp.in:
	Delete these files.

doc/user_guide.texi:
	Delete the documentation about the Prolog support.

NEWS:
w3/news/newsdb.inc:
        Mention that we've removed the Prolog support.

Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.133
diff -u -r1.133 NEWS
--- NEWS	1999/03/07 14:02:28	1.133
+++ NEWS	1999/03/14 05:21:35
@@ -15,3 +15,16 @@
   See the "Interactive query commands" subsection of the "Debugger commands"
   section of the "Debugging" chapter of the Mercury User's Guide for details.
 
+* We've removed the support for using a Prolog debugger on Mercury programs.
+
+  Now that we have a working Mercury debugger, there's no longer any need to
+  use a Prolog debugger for debugging Mercury code.
+
+  (Normally we would try to warn if any feature is to be removed at least
+  one release in advance.  However, in this case a simple work-around is
+  possible: in the unlikely event that anyone happened to have any makefiles
+  or scripts that depended on this support, they can install the latest
+  Mercury distribution and still continue to use the Prolog support from
+  Mercury 0.8, just by including the `bin' directories for both versions
+  in their PATH, with the more recent one first, of course.)
+
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.70
diff -u -r1.70 bootcheck
--- bootcheck	1998/12/02 00:49:29	1.70
+++ bootcheck	1999/03/14 04:40:01
@@ -32,10 +32,6 @@
 		Copy the profiler directory instead of linking it.
 		This is sometimes necessary for bootstrapping
 		changes.
-	-s, --sicstus
-		As well as running the normal bootcheck, also build a SICStus
-		Prolog version of the compiler and check it against the
-		stage 2 directory.
 	-t, --no-test-suite
 		By default, bootcheck will also run the test quite.
 		This option prevents that.
@@ -49,10 +45,6 @@
 	-3, --keep-stage-3
 		Don't rebuild the stage 3 directory from scratch after
 		building stage 1.  Instead use the existing stage 3 directory.
-	--keep-stage-2-sicstus
-		Don't rebuild the SICStus stage 2 directory from scratch after
-		building stage 1.  Instead use the existing SICStus stage 2
-		directory.
 	--use-subdirs
 		Assume intermediate files are built in subdirectories.
 		(Same as the \`--use-subdirs' option to mmake and mmc.)
@@ -70,8 +62,6 @@
 copy_profiler=false
 keep_stage_2=false
 keep_stage_3=false
-keep_stage_2_sicstus=false
-test_sicstus=false
 if [ -d compiler/Mercury ]; then
 	use_subdirs=${MMAKE_USE_SUBDIRS=yes}
 else
@@ -125,9 +115,6 @@
 	-g|--copy-boehm-gc)
 		copy_boehm_gc=true ;;
 
-	-s|--sicstus)
-		test_sicstus=true ;;
-
 	-t|--no-test-suite)
 		runtests=false ;;
 
@@ -140,9 +127,6 @@
 	-3|--keep-stage-3)
 		keep_stage_3=true ;;
 
-	--keep-stage-2-sicstus)
-		keep_stage_2_sicstus=true ;;
-
 	--use-subdirs)
 		use_subdirs=yes ;;
 	--no-use-subdirs)
@@ -204,227 +188,6 @@
 if test "$RMSTAGECMD" = ""
 then
 	RMSTAGECMD="/bin/rm -fr"
-fi
-
-if $test_sicstus
-then
-	echo "Building SICStus stage 1..." 1>&2
-	if
-		cd $root/library &&
-		mmake $mmake_opts $jfactor sicstus &&
-		cd $root/compiler &&
-		mmake $mmake_opts $jfactor sicstus &&
-		cd $root
-	then
-		echo "building of SICStus stage 1 successful"
-	else
-		echo "building of SICStus stage 1 not successful"
-		exit 1
-	fi
-
-	MERCURY_COMPILER=$root/compiler/mercury_compile.sicstus
-	export MERCURY_COMPILER
-	MERCURY_INT_DIR=$root/stage2_sicstus/library
-	export MERCURY_INT_DIR
-
-	[ -d stage2_sicstus ] || mkdir stage2_sicstus
-	if $keep_stage_2_sicstus
-	then
-		echo keeping existing stage2_sicstus
-	else
-		# We try to do the removal of the stage 2 directory in parallel
-		# since recursive rm's across NFS can be quite slow ...
-		$RMSTAGECMD $root/stage2_sicstus/compiler < /dev/null &
-		$RMSTAGECMD $root/stage2_sicstus/library < /dev/null &
-		wait
-		$RMSTAGECMD $root/stage2_sicstus/* < /dev/null
-		/bin/rm -fr $root/stage2_sicstus/* < /dev/null
-		/bin/rm -fr $root/stage2_sicstus/.[a-zA-Z]* < /dev/null
-	fi
-
-	set +x
-	echo linking SICStus stage 2... 1>&2
-	cd stage2_sicstus
-	mkdir compiler
-	cd compiler
-	# Break up the links into several chunks.
-	# This is needed to cope with small limits on the size of argument
-	# vectors.
-
-	ln -s $root/compiler/[a-h]*.m .
-	ln -s $root/compiler/[i-s]*.m .
-	ln -s $root/compiler/[t-z]*.m .
-	cp $root/compiler/Mmake* .
-	cd $root/stage2_sicstus
-	mkdir library
-	cd library
-	ln -s $root/library/library.nu.nl.in .
-	ln -s $root/library/[a-l]*.m .
-	ln -s $root/library/[m-z]*.m .
-	ln -s $root/library/*.nl .
-	cp $root/library/Mmake* .
-	ln -s $root/library/$STD_LIB_NAME.init .
-	cd $root/stage2_sicstus
-	mkdir browser
-	cd browser
-	ln -s $root/browser/*.m .
-	cp $root/browser/Mmake* .
-	ln -s $root/browser/$BROWSER_LIB_NAME.init .
-	cd $root/stage2_sicstus
-	if "$copy_runtime"
-	then
-		# Remove symbolic link to the stage 1 runtime if it's present,
-		# which it can be with the -2 option.
-		rm runtime
-		mkdir runtime
-		cd runtime
-		ln -s $root/runtime/*.h .
-		ln -s $root/runtime/*.c .
-		ln -s $root/runtime/*.in .
-		cp $root/runtime/Mmake* .
-		ln -s $root/runtime/machdeps .
-		cd $root/stage2_sicstus
-		rm trace
-		mkdir trace
-		cd trace
-		ln -s $root/trace/*.h .
-		ln -s $root/trace/*.c .
-		cp $root/trace/Mmake* .
-		cd $root/stage2_sicstus
-	else
-		ln -s $root/runtime .
-		ln -s $root/trace .
-	fi
-	if "$copy_boehm_gc"
-	then
-		# Remove symbolic link to the stage 1 boehm_gc if it's present,
-		# which it can be with the -2 option.
-		rm boehm_gc
-		mkdir boehm_gc
-		cd boehm_gc
-		ln -s $root/boehm_gc/*.h .
-		ln -s $root/boehm_gc/*.c .
-		ln -s $root/boehm_gc/*.s .
-		ln -s $root/boehm_gc/include .
-		cp $root/boehm_gc/Mmake* .
-		cp $root/boehm_gc/Makefile .
-		cd $root/stage2_sicstus
-	else
-		ln -s $root/boehm_gc .
-	fi
-	ln -s $root/doc .
-	ln -s $root/scripts .
-	ln -s $root/util .
-	if "$copy_profiler"
-	then
-		mkdir profiler
-		cd profiler
-		ln -s $root/profiler/*.m .
-		cp $root/profiler/Mmake* .
-		cd $root/stage2_sicstus
-	else
-		ln -s $root/profiler .
-	fi
-	ln -s $root/conf* .
-	ln -s $root/VERSION .
-	ln -s $root/.README.in .
-	ln -s $root/.INSTALL.in .
-	rm -f config*.log
-	cp $root/Mmake* .
-	if test -f $root/Mmake.stage.params
-	then
-		/bin/rm -f Mmake.params
-		cp $root/Mmake.stage.params Mmake.params
-	fi
-	cd $root
-
-	set -x
-
-	if
-		cd stage2_sicstus &&
-		mmake $mmake_opts depend_library depend_browser \
-			depend_compiler depend_profiler &&
-		cd $root
-	then
-		echo "building of SICStus stage 2 dependencies successful"
-	else
-		echo "building of SICStus stage 2 dependencies not successful"
-		exit 1
-	fi
-
-	MMAKE_VPATH=.
-	export MMAKE_VPATH
-	MMAKE_DIR=$root/scripts
-	export MMAKE_DIR
-
-	if
-		cd stage2_sicstus/library &&
-		mmake $mmake_opts $jfactor all-ints &&
-		mmake $mmake_opts $jfactor cs
-	then
-		echo "building of SICStus stage 2 library successful"
-	else
-		echo "building of SICStus stage 2 library not successful"
-		exit 1
-	fi
-	cd $root
-
-	if
-		cd stage2_sicstus/browser &&
-		mmake $mmake_opts $jfactor cs
-	then
-		echo "building of SICStus stage 2 browser successful"
-	else
-		echo "building of SICStus stage 2 browser not successful"
-		exit 1
-	fi
-	cd $root
-
-	if
-		cd stage2_sicstus/compiler &&
-		mmake $mmake_opts $jfactor cs
-	then
-		echo "building of SICStus stage 2 compiler successful"
-	else
-		echo "building of SICStus stage 2 compiler not successful"
-		exit 1
-	fi
-	cd $root
-
-	sicstus_diff_status=0
-
-	exec 3>&1		# save stdout in fd 3
-	if [ -n "$outfile" ]
-	then
-		exec > "$outfile"	# redirect stdout to $outfile
-	fi
-
-	for dir in library browser compiler; do
-	    for file in stage2/$dir/${cs_subdir}*.c; do
-		diff -u $file \
-			stage2_sicstus/${cs_subdir}$dir/`basename $file` ||
-				sicstus_diff_status=1
-	    done
-	done
-
-	exec >&3		# restore stdout from fd 3
-	if [ $sicstus_diff_status -ne 0 ]; then
-		echo "error - SICStus stage 2 and Mercury stage 2 differ!"
-		exit 1
-	else
-		echo "SICStus stage 2 and Mercury stage 2 compare ok"
-		echo "removing SICStus stage 2..."
-		# We try to do the removal of the SICStus stage 2 directory
-		# in parallel since recursive rm's across NFS can be quite
-		# slow ...
-		$RMSTAGECMD $root/stage2_sicstus/compiler < /dev/null &
-		$RMSTAGECMD $root/stage2_sicstus/library < /dev/null &
-		wait
-		$RMSTAGECMD $root/stage2_sicstus/* < /dev/null
-		/bin/rm -fr $root/stage2_sicstus/* < /dev/null
-		/bin/rm -fr $root/stage2_sicstus/.[a-zA-Z]* < /dev/null
-		exit 0
-	fi
 fi
 
 if $do_bootcheck
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.288
diff -u -r1.288 make_hlds.m
--- make_hlds.m	1999/03/13 01:29:09	1.288
+++ make_hlds.m	1999/03/14 05:02:29
@@ -277,7 +277,24 @@
 		io__set_output_stream(OldStream, _)
 	).
 
-add_item_decl_pass_1(nothing, _, Status, Module, Status, Module) --> [].
+add_item_decl_pass_1(nothing, Context, Status, Module, Status, Module) -->
+	%
+	% Currently "nothing" is used only for NU-Prolog `when' declarations,
+	% which we used to quietly ignore.  We want to eventually drop support
+	% for them, but to ease the transition, for now we just issue
+	% a warning message.
+	%
+	prog_out__write_context(Context),
+	report_warning(
+		"Warning: NU-Prolog `when' declarations are deprecated.\n"),
+	globals__io_lookup_bool_option(verbose_errors, VerboseErrors),
+	( { VerboseErrors = yes } ->
+		prog_out__write_context(Context),
+		io__write_string("Future releases of the Mercury system "),
+		io__write_string("will not support `when' declarations.\n")
+	;
+		[]
+	).
 
 add_item_decl_pass_1(typeclass(Constraints, Name, Vars, Interface, VarSet), 
 		Context, Status, Module0, Status, Module) -->
Index: compiler/prog_io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.180
diff -u -r1.180 prog_io.m
--- prog_io.m	1999/02/08 20:52:38	1.180
+++ prog_io.m	1999/03/14 05:03:34
@@ -1030,8 +1030,10 @@
 	),
 	check_no_attributes(Result1, Attributes, Result).
 
-	% NU-Prolog `when' declarations are silently ignored for
-	% backwards compatibility.
+	% 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) :-
 	Result0 = ok(nothing),
Index: library/bag.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/bag.m,v
retrieving revision 1.17
diff -u -r1.17 bag.m
--- bag.m	1998/12/03 04:59:36	1.17
+++ bag.m	1999/03/14 05:06:20
@@ -222,8 +222,6 @@
 
 %---------------------------------------------------------------------------%
 
-:- bag__insert_list(_, List, _) when List.
-
 bag__insert_list(Bag, [], Bag).
 bag__insert_list(Bag0, [Item|Items], Bag) :-
 	bag__insert(Bag0, Item, Bag1),
@@ -282,8 +280,6 @@
 	;
 		error("bag__det_remove: Missing item in bag.")
 	).
-
-:- bag__remove_list(_, List, _) when List.
 
 bag__remove_list(Bag, [], Bag).
 bag__remove_list(Bag0, [X | Xs], Bag) :-
Index: library/bintree.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/bintree.m,v
retrieving revision 1.39
diff -u -r1.39 bintree.m
--- bintree.m	1999/03/07 23:41:02	1.39
+++ bintree.m	1999/03/14 05:09:54
@@ -123,8 +123,6 @@
 
 %-----------------------------------------------------------------------------%
 
-:- bintree__insert(A, B, _, _) when A and B.
-
 bintree__insert(empty, Key, Value, tree(Key, Value, empty, empty)).
 bintree__insert(tree(Key0, Value0, Left, Right), Key, Value, Tree) :-
 	compare(Result, Key0, Key),
@@ -164,8 +162,6 @@
 
 %-----------------------------------------------------------------------------%
 
-:- bintree__set(A, B, _, _) when A and B.
-
 bintree__set(empty, Key, Value, tree(Key, Value, empty, empty)).
 bintree__set(tree(Key0, Value0, Left, Right), Key, Value, Tree) :-
 	compare(Result, Key0, Key),
@@ -185,8 +181,6 @@
 
 %-----------------------------------------------------------------------------%
 
-:- bintree__search(A, B, _) when A and B.
-
 bintree__search(tree(K0, V0, Left, Right), K, V) :-
 	compare(Result, K0, K),
 	(
@@ -201,6 +195,8 @@
 		bintree__search(Left, K, V)
 	).
 
+%-----------------------------------------------------------------------------%
+
 bintree__lookup(Tree, K, V) :-
 	( bintree__search(Tree, K, V0) ->
 		V = V0
@@ -210,8 +206,6 @@
 
 %-----------------------------------------------------------------------------%
 
-:- bintree__lower_bound_search(A, B, _, _) when A and B.
-
 bintree__lower_bound_search(tree(K0, V0, Left, Right), SearchK, K, V) :-
 	compare(Result, K0, SearchK),
 	(
@@ -244,8 +238,6 @@
 
 %-----------------------------------------------------------------------------%
 
-:- bintree__upper_bound_search(A, B, _, _) when A and B.
-
 bintree__upper_bound_search(tree(K0, V0, Left, Right), SearchK, K, V) :-
 	compare(Result, K0, SearchK),
 	(
@@ -277,8 +269,6 @@
 	).
 
 %-----------------------------------------------------------------------------%
-
-:- bintree__delete(A, B, _) when A and B.
 
 bintree__delete(empty, _K, empty).
 bintree__delete(tree(K0, V0, Left, Right), K, Tree) :-
Index: library/bintree_set.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/bintree_set.m,v
retrieving revision 1.15
diff -u -r1.15 bintree_set.m
--- bintree_set.m	1998/01/23 12:33:11	1.15
+++ bintree_set.m	1999/03/14 05:06:36
@@ -213,8 +213,6 @@
 
 %--------------------------------------------------------------------------%
 
-:- bintree_set__insert_list(_, Xs, _) when Xs.
-
 bintree_set__insert_list(S, [], S).
 bintree_set__insert_list(S0, [E|Es], S) :-
 	bintree_set__insert(S0, E, S1),
@@ -225,8 +223,6 @@
 
 %--------------------------------------------------------------------------%
 
-:- bintree_set__remove_list(_, Xs, _) when Xs.
-
 bintree_set__remove_list(S, [], S).
 bintree_set__remove_list(S0, [X | Xs], S) :-
 	bintree_set__member(X, S0),
@@ -237,8 +233,6 @@
 	bintree__remove(S0, E, _, S).
 
 %--------------------------------------------------------------------------%
-
-:- bintree_set__delete_list(_, Xs, _) when Xs.
 
 bintree_set__delete_list(S, [], S).
 bintree_set__delete_list(S0, [X | Xs], S) :-
Index: library/char.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/char.m,v
retrieving revision 1.26
diff -u -r1.26 char.m
--- char.m	1998/12/15 00:21:49	1.26
+++ char.m	1999/03/14 05:06:39
@@ -370,8 +370,6 @@
 
 %-----------------------------------------------------------------------------%
 
-:- char__lower_upper(X, Y) when X or Y.
-
 char__lower_upper('a', 'A').
 char__lower_upper('b', 'B').
 char__lower_upper('c', 'C').
Index: library/list.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/list.m,v
retrieving revision 1.85
diff -u -r1.85 list.m
--- list.m	1998/09/15 07:38:31	1.85
+++ list.m	1999/03/14 05:07:07
@@ -489,8 +489,6 @@
 list__append([X | Xs], Ys, [X | Zs]) :-
 	list__append(Xs, Ys, Zs).
 
-:- list__remove_suffix(_List, Suffix, _Prefix) when Suffix.
-
 list__remove_suffix(List, Suffix, Prefix) :-
 	list__length(List, ListLength),
 	list__length(Suffix, SuffixLength),
@@ -814,8 +812,6 @@
 
 :- pred list__zip2(list(T), list(T), list(T)).
 :- mode list__zip2(in, in, out) is det.
-
-:- list__zip2(_, Bs, _) when Bs. % NU-Prolog indexing
 
 list__zip2(As, [], As).
 list__zip2(As, [B|Bs], [B|Cs]) :-
Index: library/map.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/map.m,v
retrieving revision 1.68
diff -u -r1.68 map.m
--- map.m	1999/03/07 23:41:03	1.68
+++ map.m	1999/03/14 05:09:09
@@ -267,12 +267,8 @@
 map__member(Map, K, V) :-
 	tree234__member(Map, K, V).
 
-:- map__search(_Map, K, _V) when K.	% required by bimap.m
-
 map__search(Map, K, V) :-
 	tree234__search(Map, K, V).
-
-:- map__lookup(_Map, K, _V) when K.	% required by bimap.m
 
 map__lookup(Map, K, V) :-
 	( tree234__search(Map, K, V1) ->
Index: library/set_unordlist.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/set_unordlist.m,v
retrieving revision 1.13
diff -u -r1.13 set_unordlist.m
--- set_unordlist.m	1998/01/23 12:33:34	1.13
+++ set_unordlist.m	1999/03/14 05:08:04
@@ -191,8 +191,6 @@
 set_unordlist__to_sorted_list(Set, List) :-
 	list__sort_and_remove_dups(Set, List).
 
-:- set_unordlist__insert_list(_, Xs, _) when Xs.	% NU-Prolog indexing.
-
 set_unordlist__insert_list(Set0, List, Set) :-
 	list__append(List, Set0, Set).
 
@@ -226,8 +224,6 @@
 		R = no
 	).
 
-:- set_unordlist__delete_list(_, Xs, _) when Xs.
-
 set_unordlist__delete_list(S, [], S).
 set_unordlist__delete_list(S0, [X | Xs], S) :-
 	set_unordlist__delete(S0, X, S1),
@@ -235,8 +231,6 @@
 
 set_unordlist__delete(S0, E, S) :-
 	list__delete_all(S0, E, S).
-
-:- set_unordlist__remove_list(_, Xs, _) when Xs.
 
 set_unordlist__remove_list(S, [], S).
 set_unordlist__remove_list(S0, [X | Xs], S) :-
Index: library/string.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/string.m,v
retrieving revision 1.108
diff -u -r1.108 string.m
--- string.m	1998/11/05 03:53:23	1.108
+++ string.m	1999/03/14 05:08:13
@@ -516,7 +516,6 @@
 string__prefix(String, Prefix) :-
 	string__append(Prefix, _, String).
 
-:- string__char_to_string(Char, String) when Char or String.
 string__char_to_string(Char, String) :-
 	string__to_int_list(String, [Code]),
 	char__to_int(Char, Code).
Index: library/term.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/term.m,v
retrieving revision 1.88
diff -u -r1.88 term.m
--- term.m	1998/11/20 04:10:34	1.88
+++ term.m	1999/03/14 05:08:22
@@ -791,8 +791,6 @@
 	% Unify two terms (with occurs check), updating the bindings of
 	% the variables in the terms.  
 
-:- term__unify(X, Y, _, _) when X and Y.		% NU-Prolog indexing
-
 term__unify(term__variable(X), term__variable(Y), Bindings0, Bindings) :-
 	( %%% if some [BindingOfX]
 		map__search(Bindings0, X, BindingOfX)
@@ -1051,16 +1049,12 @@
 
 %-----------------------------------------------------------------------------%
 
-:- term__term_list_to_var_list(Terms, Vars) when Terms or Vars. % Indexing
-
 term__term_list_to_var_list(Terms, Vars) :-
 	( term__var_list_to_term_list(Vars0, Terms) ->
 		Vars = Vars0
 	;
 		error("term__term_list_to_var_list")
 	).
-
-:- term__var_list_to_term_list(Terms, Vars) when Terms or Vars. % Indexing
 
 term__var_list_to_term_list([], []).
 term__var_list_to_term_list([Var | Vars], [term__variable(Var) | Terms]) :-

*******************************************************************************
The rest of the diff is the same as it was last time.
*******************************************************************************

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.150
diff -u -r1.150 configure.in
--- configure.in	1999/03/05 12:52:18	1.150
+++ configure.in	1999/03/10 16:40:48
@@ -120,47 +120,6 @@
 fi
 AC_SUBST(GNU_MAKE)
 #-----------------------------------------------------------------------------#
-INSTALL_SICSTUS=
-SICSTUS=
-MERCURY_MSG("looking for SICStus Prolog...")
-AC_PROGRAMS_CHECK(SP,sp sicstus prolog)
-if test "$SP" != ""; then
-	case "`echo 'prolog_flag(version, V, V), write(V), nl, halt.' |
-			$SP 2>&1`" in
-		SICStus*)
-			INSTALL_SICSTUS=install_sicstus
-			SICSTUS=sicstus
-			;;
-	esac
-fi
-if test "$INSTALL_SICSTUS" = ""; then
-	AC_MSG_WARN(SICStus Prolog not found)
-else
-	MERCURY_MSG("found SICStus Prolog: $SP")
-fi
-AC_SUBST(INSTALL_SICSTUS)
-AC_SUBST(SICSTUS)
-#-----------------------------------------------------------------------------#
-INSTALL_NUPROLOG=
-NUPROLOG=
-MERCURY_MSG("looking for NU-Prolog...")
-AC_PROGRAMS_CHECK(NP,np)
-if test "$NP" != ""; then
-	case "`$NP < /dev/null 2>&1`" in
-		NU-Prolog*)
-			INSTALL_NUPROLOG=install_nuprolog
-			NUPROLOG=nuprolog
-			;;
-	esac
-fi
-if test "$INSTALL_NUPROLOG" = ""; then
-	AC_MSG_WARN(NU-Prolog not found)
-else
-	MERCURY_MSG("found NU-Prolog: $NP")
-fi
-AC_SUBST(INSTALL_NUPROLOG)
-AC_SUBST(NUPROLOG)
-#-----------------------------------------------------------------------------#
 MERCURY_MSG("looking for a way to create named pipes...")
 
 save_PATH="$PATH"
@@ -1848,8 +1807,7 @@
 #-----------------------------------------------------------------------------#
 AC_OUTPUT(Mmake.common scripts/Mmake.vars scripts/mmc scripts/mprof
 scripts/mercury_update_interface scripts/mgnuc scripts/ml
-scripts/mmake scripts/mnc scripts/mnl scripts/mnp scripts/c2init
-scripts/mdb scripts/mdbrc scripts/msc scripts/msl scripts/msp
+scripts/mmake scripts/c2init scripts/mdb scripts/mdbrc 
 scripts/sicstus_conv scripts/mkfifo_using_mknod bindist/bindist.build_vars
 ,
 for header in $CONFIG_HEADERS ; do
Index: bindist/bindist.configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.configure.in,v
retrieving revision 1.21
diff -u -r1.21 bindist.configure.in
--- bindist.configure.in	1998/12/22 07:54:12	1.21
+++ bindist.configure.in	1999/03/10 16:41:16
@@ -82,50 +82,6 @@
 fi
 AC_SUBST(GNU_MAKE)
 #-----------------------------------------------------------------------------#
-INSTALL_SICSTUS=
-SICSTUS=
-SP=
-echo "looking for SICStus Prolog..."
-AC_PROGRAMS_CHECK(SP,sp sicstus prolog)
-if test "$SP" != ""; then
-	case "`echo 'prolog_flag(version, V, V), write(V), nl, halt.' |
-			$SP 2>&1`" in
-		SICStus*)
-			INSTALL_SICSTUS=install_sicstus
-			SICSTUS=sicstus
-			;;
-	esac
-fi
-if test "$INSTALL_SICSTUS" = ""; then
-	AC_MSG_WARN(SICStus Prolog not found)
-else
-	echo "found SICStus Prolog: $SP"
-fi
-AC_SUBST(INSTALL_SICSTUS)
-AC_SUBST(SICSTUS)
-#-----------------------------------------------------------------------------#
-INSTALL_NUPROLOG=
-NUPROLOG=
-NP=
-
-echo "looking for NU-Prolog..."
-AC_PROGRAMS_CHECK(NP,np)
-if test "$NP" != ""; then
-	case "`$NP < /dev/null 2>&1`" in
-		NU-Prolog*)
-			INSTALL_NUPROLOG=install_nuprolog
-			NUPROLOG=nuprolog
-			;;
-	esac
-fi
-if test "$INSTALL_NUPROLOG" = ""; then
-	AC_MSG_WARN(NU-Prolog not found)
-else
-	echo "found NU-Prolog: $NP"
-fi
-AC_SUBST(NUPROLOG)
-AC_SUBST(INSTALL_NUPROLOG)
-#-----------------------------------------------------------------------------#
 echo "looking for a way to create named pipes..."
 
 save_PATH="$PATH"
@@ -235,8 +191,7 @@
 
 AC_OUTPUT(Makefile scripts/mmc scripts/mprof
 scripts/mercury_update_interface scripts/mgnuc scripts/ml
-scripts/mmake scripts/mnc scripts/mnl scripts/mnp scripts/c2init
-scripts/msc scripts/msl scripts/msp scripts/sicstus_conv
+scripts/mmake scripts/c2init scripts/sicstus_conv
 scripts/mkfifo_using_mknod scripts/Mmake.vars
 scripts/mdb scripts/mdbrc
 ,
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.158
diff -u -r1.158 user_guide.texi
--- user_guide.texi	1999/03/05 12:52:24	1.158
+++ user_guide.texi	1999/03/10 20:13:40
@@ -82,7 +82,6 @@
 * Invocation::      List of options for the Mercury compiler
 * Environment::     Environment variables used by the compiler and utilities
 * C compilers::     How to use a C compiler other than GNU C
-* Using Prolog::    Building and debugging Mercury programs with Prolog
 @ifset aditi 
 * Using Aditi::     Executing Mercury predicates using the Aditi
                     deductive database
@@ -161,8 +160,6 @@
 As usual, @file{.c} files are C source code,
 @file{.h} files are C header files,
 @file{.o} files are object code,
- at file{.no} files are NU-Prolog object code, and
- at file{.ql} files are SICStus Prolog object code.
 In addition, @file{.pic_o} files are object code files
 that contain position-independent code (PIC).
 
@@ -416,22 +413,6 @@
 @xref{Output-level (LLDS -> C) optimization options} for more information
 about @samp{--split-c-files}.
 
- at item @var{main-module}.nu
-Compiles and links @var{main-module} using NU-Prolog.
-
- at item @var{main-module}.nu.debug
-Compiles and links @var{main-module} using NU-Prolog.
-The resulting executable will start up in the NU-Prolog interpreter
-rather than calling main/2.
-
- at item @var{main-module}.sicstus
-Compiles and links @var{main-module} using SICStus Prolog.
-
- at item @var{main-module}.sicstus.debug
-Compiles and links @var{main-module} using SICStus Prolog.
-The resulting executable will start up in the SICStus Prolog interpreter
-rather than calling main/2.
-
 @item lib at var{main-module}
 Builds a library whose top-level module is @var{main-module}.
 This will build a static object library, a shared object library
@@ -1354,7 +1335,7 @@
 You can return from the query prompt to the @samp{mdb>} prompt
 by typing the end-of-file indicator (typically control-D or control-Z),
 or by typing @samp{quit.}.
-
+ at sp 1
 The module names @var{module1}, @var{module2}, @dots{} specify
 which modules will be imported.  Note that you can also
 add new modules to the list of imports directly at the query prompt,
@@ -1363,7 +1344,7 @@
 Queries can only use symbols that are exported from a module;
 entities which are declared in a module's implementation section
 only cannot be used.
-
+ at sp 1
 The three variants differ in what kind of goals they allow. 
 For goals which perform I/O, you need to use @samp{io_query};
 this lets you type in the goal using DCG syntax.
@@ -1372,12 +1353,12 @@
 this finds only one solution to the specified goal.
 For all other goals, you can use plain @samp{query}, which
 finds all the solutions to the goal.
-
+ at sp 1
 For @samp{query} and @samp{cc_query}, the debugger will print
 out all the variables in the goal using @samp{io__write}.
 The goal must bind all of its variables to ground terms,
 otherwise you will get a mode error.
-
+ at sp 1
 The current implementation works by compiling the queries on-the-fly
 and then dynamically linking them into the program being debugged.
 Thus it make take a little while for your query to be executed.
@@ -1386,7 +1367,6 @@
 Note that dynamic linking may not be supported on some systems;
 if you are using a system for which dynamic linking is not supported,
 you will get an error message when you try to run these commands.
-
 @end table
 
 @node Forward movement commands
@@ -2595,13 +2575,13 @@
 Output a bytecode form of the module for use
 by an experimental debugger.
 
- at item --generate-prolog
-Convert the program to Prolog.  Output to file @file{@var{module}.pl}
-or @file{@var{module}.nl} (depending the the dialect).
-
- at item --prolog-dialect @var{dialect}
-Target the named dialect if generating Prolog code.
-The @var{dialect} should be one of @samp{sicstus}, @samp{nu}.
+ at c @item --generate-prolog
+ at c Convert the program to Prolog.  Output to file @file{@var{module}.pl}
+ at c or @file{@var{module}.nl} (depending the the dialect).
+ at c
+ at c @item --prolog-dialect @var{dialect}
+ at c Target the named dialect if generating Prolog code.
+ at c The @var{dialect} should be one of @samp{sicstus}, @samp{nu}.
 
 @item --auto-comments
 Output comments in the @file{@var{module}.c} file.
@@ -3715,36 +3695,6 @@
 The names of the .init files in the Mercury library.
 
 @sp 1
- at item MERCURY_NU_LIB_DIR
-Directory for the NU-Prolog object files (@file{*.no}) for the
-NU-Prolog Mercury library.
-
- at sp 1
- at item MERCURY_NU_LIB_OBJS
-List of the NU-Prolog object files (@file{*.no}) for the Mercury
-library.
-
- at sp 1
- at item MERCURY_NU_OVERRIDING_LIB_OBJS
-List of the NU-Prolog object files (@file{*.no}) for the Mercury
-library which override definitions given in @samp{MERCURY_NU_LIB_OBJS}.
-
- at sp 1
- at item MERCURY_SP_LIB_DIR
-Directory for the Sicstus-Prolog object files (@file{*.ql}) for the
-Sicstus-Prolog Mercury library.
-
- at sp 1
- at item MERCURY_SP_LIB_OBJS
-List of the Sicstus-Prolog object files (@file{*.ql}) for the Mercury
-library.
-
- at sp 1
- at item MERCURY_SP_OVERRIDING_LIB_OBJS
-List of the Sicstus-Prolog object files (@file{*.ql}) for the Mercury
-library which override definitions given in @samp{MERCURY_SP_LIB_OBJS}.
-
- at sp 1
 @item MERCURY_COMPILER
 Filename of the Mercury Compiler.
 
@@ -3942,397 +3892,6 @@
 code with @samp{--no-static-ground-terms}.
 
 @end itemize
-
- at node Using Prolog
- at chapter Using Prolog
-
-Earlier versions of the Mercury implementation did not provide
-a Mercury debugger; instead, they provided a way to build Mercury
-programs using a Prolog system, so that you could use the Prolog
-debugger.  This chapter documents how to do that.
-Now that we have a native Mercury debugger, the ability to
-build Mercury programs using a Prolog system is probably not
-very useful anymore.  So for most purposes this chapter is
-really of historical interest only.  We encourage all but
-the most avid of readers to skip the rest of this chapter.
-
-The feasibility of this technique is dependent upon the program
-being written in the intersection of the Prolog and Mercury languages,
-which is possible because the two languages have almost the same syntax.
-The Mercury implementation allows you to run a Mercury program
-using NU-Prolog or SICStus Prolog.
-
-However, there is no point in using a Prolog debugger to track down a bug
-that can be detected statically by the Mercury compiler.
-The command
-
- at example
-mmc -e @var{filename1}.m ...
- at end example
-
-causes the Mercury compiler
-to perform all its syntactic and semantic checks on the named modules,
-but not to generate any code.
-
-In our experience, omitting that step is not wise.
-If you do omit it, you often waste a lot of time
-debugging problems that the compiler could have detected for you.
-
- at menu
-* Using NU-Prolog::      Building and debugging Mercury programs with NU-Prolog
-* Using SICStus::        Building and debugging with SICStus Prolog
-* Controlling printout:: Controlling display of large terms during debugging
-* Prolog hazards::       The hazards of executing Mercury programs using Prolog
- at end menu
-
- at node Using NU-Prolog
- at section Using NU-Prolog
-
-You can compile a Mercury source file using NU-Prolog via the command
-
- at example
-mnc @var{filename1}.m ...
- at end example
-
- at samp{mnc} is the Mercury variant of @samp{nc}, the NU-Prolog compiler.
-It adapts @code{nc} to compile Mercury programs,
-e.g. by defining do-nothing predicates for the various Mercury declarations
-(which are executed by @code{nc}).
-
-Some invocations of @samp{mnc} will result in warnings such as
-
- at example
-Warning: main is a system predicate.
-It shouldn't be used as a non-terminal.
- at end example
-
-Such warnings should be ignored.
-
- at samp{mnc} compiles the modules it is given into NU-Prolog bytecode,
-stored in files with a @file{.no} suffix.
-You can link these together using the command
-
- at example
-mnl -o @var{main-module} @var{filename1}.no ...
- at end example
-
-Ignore any warnings such as
-
- at example
-Warning: main/2 redefined
-Warning: solutions/2 redefined
-Warning: !/0 redefined
- at end example
-
- at samp{mnl}, the Mercury NU-Prolog linker,
-will put the executable (actually a shell script invoking a save file)
-into the file @file{@var{main-module}.nu}.
-This can be executed normally using
-
- at example
-./@var{main-module}.nu @var{arguments}
- at end example
-
-Alternatively, one can execute such programs using @samp{mnp},
-the Mercury version of np, the NU-Prolog interpreter.
-The command
-
- at example
-mnp
- at end example
-
-will start up the Mercury NU-Prolog interpreter.
-Inside the interpreter, you can load your source files
-with a normal consulting command such as
-
- at example
-['@var{filename}.m'].
- at end example
-
-You can also use the @samp{--debug} option to @samp{mnl} when linking.
-This will produce an executable whose entry point is the NU-Prolog interpreter,
-rather than main/2 in your program.
-
-In both cases, you can start executing your program by typing
-
- at example
-r("@var{program-name} @var{arguments}").
- at end example
-
-at the prompt of the NU-Prolog interpreter.
-
-All the NU-Prolog debugging commands work as usual.
-The most useful ones are
-the @code{trace} and @code{spy} commands at the main prompt
-to turn on complete or selective tracing respectively,
-and the @code{l} (leap), @code{s} (skip), and @code{r} (redo)
-commands of the tracer.
-For more information, see the NU-Prolog documentation.
-
-By default the debugger only displays the top levels of terms;
-you can use the @samp{|} command to enter an interactive term browser.
-(Within the term browser, type @samp{h.} for help.)
-See @ref{Controlling printout} for more information on controlling the
-printout of terms.
-
-Also note that in the debugger, we use a version of @code{error/1}
-which fails rather than aborting after printing the ``Software Error:''
-message.  This makes debugging easier,
-but will of course change the behaviour after an error occurs.
-
- at node Using SICStus
- at section Using SICStus Prolog
-
-Using SICStus Prolog is similar to using NU-Prolog,
-except that the commands to use are @samp{msc}, @samp{msl}, and
- at samp{msp} rather than @samp{mnc}, @samp{mnl}, and @samp{mnp}.
-
-Due to shortcomings in SICStus Prolog
-(in particular, the lack of backslash escapes in character strings),
-you need to use @samp{sicstus_conv} to convert Mercury @samp{.m} files
-to the @samp{.pl} files that SICStus Prolog expects
-before you can load them into the interpreter.
-The command to use is just
-
- at example
-sicstus_conv @var{filename}.m
- at end example
-
-By default, @samp{msc} compiles files to machine code using
-SICStus Prolog's @samp{fastcode} mode.  If space is more important
-than speed, you can use the @samp{--mode compactcode} option,
-which instructs @code{msc} to use SICStus Prolog's @samp{compactcode}
-mode, which compiles files to a bytecode format.
-
- at node Controlling printout
- at section Controlling printout of large terms
-
-You can control the printout of terms shown as the results of queries,
-and as shown by the debugger, to a great extent.  At the coarsest level,
-you can limit the depth to which terms are shown, and the number of
-arguments of terms (and the number of elements of lists) to be shown.
-Further, you can ``hide'' some of the arguments of a term, based upon the
-functor of that term.  And finally, you can write your own code to print
-out certain kinds of terms in a more convenient manner.
-
- at menu
-* Limiting size::  Limiting Print Depth and Length
-* Hiding terms::   Hiding terms and subterms based upon term functor
-* Customization::  Customizing printout by writing your own printout code
- at end menu
-
- at node Limiting size
- at subsection Limiting print depth and length
-
-You can limit the depth to which terms will be printed.  When a term to
-be printed appears at the depth limit, only its name and arity will be
-shown, enclosed in angle brackets, for example @samp{<foo/3>}.
-
-You can also control the number of arguments of terms, and the lengths
-of lists, to be shown.  When this length limit is reached, an ellipsis
-mark (@samp{...}) will be printed.
-
-The following predicates control the print depth and length limits.
-
- at example
-set_print_depth(@var{Depth})
- at end example
-Sets the print depth limit to @var{Depth}.  If @var{Depth} is less than 0, the
-print depth is unlimited.  The default print depth limit is 2.
-
- at example
-print_depth(@var{Depth})
- at end example
-Unifies @var{Depth} with the current print depth limit.
-
- at example
-set_print_length(@var{Length})
- at end example
-Sets the print length limit to @var{Length}.  If @var{Length} is less
-than 0, the print length is unlimited.
-
- at example
-print_length(@var{Length})
- at end example
-Unifies @var{Length} with the current print length limit.
-
-
- at node Hiding terms
- at subsection Hiding terms and subterms
-
-Sometimes you will have terms which appear frequently during debugging
-and which tend to fill up the screen with lots of uninteresting text,
-even with depth limits in force.  In such cases, you may want to hide
-terms based upon their functor, regardless of their print depth.  You
-may also occasionally want to hide just a few of the arguments of a
-term.  These predicates allow you to do that.
-
-Note that if the @emph{top level} functor of the term to be printed is
-hidden, its first level arguments will be shown anyway.  This is to
-avoid answer substitutions being wholly hidden, and to make it easier to
-use the subterm viewing facility of the SICStus Prolog debugger (using
-the @key{^} command) to view parts of a term.
-
-
- at example
-hide(@var{Spec})
-hide(@var{Spec, Args})
- at end example
-Allows you to elide certain arguments of certain terms, or whole terms,
-based on the functor.  @var{Spec} specifies a functor; it must be either
-a @var{Name}@code{/}@var{Arity} term, or just a functor name (in which
-case all arities are specified).  @var{Args} specifies which arguments
-of such terms should be hidden.  If given, @var{Args} must be a single
-integer or a list of integers specifying which arguments to hide.
-Hidden arguments will be printed as just a hash (@samp{#}) character.
-Alternatively, @var{Args} may be the atom @code{term}, in which case
-only the name and arity of the term are written within angle brackets,
-(e.g., @samp{<foo/3>}).  If Args is not specified, it defaults to
- at code{term}.
-
-Hidden arguments are cumulative.  That is, new arguments to be hidden are
-added to the set of arguments already hidden.  For example, if you hide
-argument 3 of all terms with functor name @samp{foo}, and then hide
-argument 1 of terms with functor @samp{foo/3}, then for @samp{foo/3}
-terms, arguments 1 and 3 will be hidden, while for all other terms with
-functor name @samp{foo}, only argument 3 will be hidden.
-
- at example
-show
-Show(@var{Spec})
-show(@var{Spec, Args})
- at end example
-Undoes the effect of hiding some arguments of terms or whole terms.
- at var{Spec} specifies a functor; it must be either a
- at var{Name}@code{/}@var{Arity} term, or just a functor name (in which
-case all arities are specified).  @var{Args} specifies which arguments
-to stop hiding; it must be a list of argument numbers or a single
-argument number.  Alternatively, it may be the atom @code{term},
-indicating that no arguments should be hidden (the whole term should be
-shown).  @var{Args} defaults to @code{term}.  The predicate
- at code{show/0} reenables showing all arguments of all terms.
-
-Note that these predicates will not affect the depth limit of printing.
-Even if you ask to show a term in full, if it appears at the depth limit of
-the term being printed, its arguments will not be shown.  If it appears
-below the depth limit, you won't see it at all.
-
-You may use the @code{hide/1,2} and @code{show/2} predicates in concert
-to hide most of the arguments of a term by first hiding all arguments,
-and then explicitly showing the few of interest.
-
- at example
-hidden(@var{Spec, Args})
- at end example
- at var{Spec} is a @var{Name}@code{/}@var{Arity} term, and @var{Args} is a
-list of the argument numbers of terms with that @var{Name} and
- at var{Arity} which are hidden, or the atom @code{term} if the entire term
-is hidden.  @var{Arity} may be the atom @code{all}, indicating that the
-specified arguments are hidden for all terms with that @var{Name} and
-any arity.  This predicate may be used to backtrack through all the
-predicates which are hidden or have any arguments hidden.
-
-
- at node Customization
- at subsection Customization of printout
-
-Occasionally you will have a term that is important to understand during
-debugging but is shown in an inconvenient manner or may be difficult to
-understand as printed.  Traditionally in Prolog, you can define clauses
-for the predicate @code{portray/1} to specify special code to print such
-a term.  Unfortunately, this won't work very well with the other
-features of Mercury's printout system.  For this you will need to define
-clauses for the predicate @code{portray_term/3}:
-
- at example
-portray_term(@var{Term, DepthLimit, Precedence})
- at end example
-Like the standard Prolog @code{portray/1} hook predicate, this code
-should either fail without printing anything, or succeed after printing
-out Term as the user would like to see it printed.  @var{DepthLimit}, if
-greater than or equal to -1, is the number of levels of the subterms of
- at var{Term} that should be printed without being elided.  If it is -1,
-then @var{Term} should probably not be printed; only a marker indicating
-what sort of term it is.  The standard @code{print_term/3} code will
-print the name and arity of the functor enclosed in angle brackets
-(e.g., <foo/3>) if @code{portray_term/3} fails at this depth level.  Be
-careful, though: if @var{DepthLimit} is less than -1, then there should
-be no depth limit.  @var{Precedence} is the precedence of the context in
-which the term will be printed; if you wish to write a term with
-operators, then you should parenthesize the printout if @var{Precedence}
-is smaller than the precedence of that operator.
-
-In printing subterms, you should call @code{print_term/3}, described
-below.  Note that the @var{DepthLimit} argument passed to portray_term/3 is
-the depth limit for the @emph{subterms} of @var{Term}, so you should
-usually pass this value to @code{print_term/3} for printing subterms
-without decrementing it.  Note also that @var{Term} will always be bound
-when @code{portray_term/3} is called, so you needn't worry about
-checking for unbound variables.
-
-Mercury already supplies special-purpose printout code to print out
-lists of character codes as double-quoted strings, and to print out maps
-as @var{Key}@code{->}@var{Value} pairs, surrounded by @samp{MAP@{@}}.
-This code appears in the file @file{portray.nl} in the Mercury library,
-and may serve as a useful example of how to write customized printing
-code.
-
- at example
-print_term(@var{Term, DepthLimit, Precedence})
- at end example
-Print out @var{Term} to the current output stream, limiting print depth
-to @var{DepthLimit}, and parenthesizing the term if its principle
-functor is an operator with precedence greater than @var{Precedence}.
- at code{print_term/3} also respects the current set of hidden functors,
-and uses the user-supplied @code{portray_term/3} hook predicate when it
-succeeds.
-
-
-
-
- at node Prolog hazards
- at section Hazards of using Prolog
-
-There are some Mercury programs which are not valid Prolog programs.
-Programs which make use of the more advanced features of Mercury will
-not work with NU-Prolog or SICStus Prolog.
-In particular, Mercury programs that use functions will generally not
-be valid Prolog programs (with the exception that the basic arithmetic
-functions such as @samp{+}, @samp{-}, etc., will work fine if you use
-Prolog's @samp{is} predicate).
-Also the use of features such as type classes, lambda expressions,
-non-trivial use of the module system, etc. will cause problems.
-
-Also, Mercury will always reorder goals
-to ensure that they are mode-correct
-(or report a mode error if it cannot do so),
-but Prolog systems will not always do so,
-and will sometimes just silently give the wrong result.
-For example, in Mercury the following predicate will usually succeed,
-whereas in Prolog it will always fail.
-
- at example
-:- pred p(list(int)::in, list(int)::out) is semidet.
-p(L0, L) :-
-        L \= [],
-        q(L0, L).
-
-:- pred q(list(int)::in, list(int)::out) is det.
- at end example
-
-The reason is that in Mercury,
-the test @samp{L \= []} is reordered to after the call to @code{q/2},
-but in Prolog, it executes even though @code{L} is not bound,
-and consequently the test always fails.
-
-NU-Prolog has logical alternatives
-to the non-logical Prolog operations,
-and since Mercury supports both syntaxes,
-you can use NU-Prolog's logical alternatives to avoid this problem.
-However, during the development of the Mercury compiler
-we had to abandon their use for efficiency reasons.
-
-Another hazard is that NU-Prolog does not have a garbage collector.
 
 @contents
 @bye
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.34
diff -u -r1.34 Mmakefile
--- Mmakefile	1998/09/29 05:10:42	1.34
+++ Mmakefile	1999/03/10 16:38:27
@@ -22,28 +22,10 @@
 
 #-----------------------------------------------------------------------------#
 
-# Specify which compilers to use to compile the library.
+# Specify which options to use to compile the library.
 # Don't change these without good reason - if you want to
 # do a temporary change, change ../Mmake.params.
 
-MNC	=	MERCURY_NC_BUILTIN="`vpath_find nc_builtin.nl`" \
-		$(SCRIPTS_DIR)/mnc
-MNL	=	MERCURY_NU_LIB_DIR=. \
-		MERCURY_NU_LIB_OBJS="`vpath_find $(library.nos) \
-					$(NU_LIBRARY_NOS)`" \
-		MERCURY_NU_OVERRIDING_LIB_OBJS="$(NU_OVERRIDING_LIBRARY_NOS)" \
-		MERCURY_NU_DEBUG_LIB_OBJS="$(NU_DEBUG_LIBRARY_NOS)" \
-		$(SCRIPTS_DIR)/mnl -v
-
-MSC	=	MERCURY_SICSTUS_COMPILER=./sicstus_compile $(SCRIPTS_DIR)/msc
-MSL	=	MERCURY_SP_LIB_DIR=. \
-		MERCURY_SICSTUS_PROLOG=./sicstus_saved_state \
-		MERCURY_SP_LIB_OBJS="`vpath_find $(qls_subdir)sp_builtin.ql \
-				$(library.qls) $(NU_LIBRARY_QLS) \
-				$(qls_subdir)portray.ql`" \
-		MERCURY_SP_OVERRIDING_LIB_OBJS="$(NU_OVERRIDING_LIBRARY_QLS)" \
-		$(SCRIPTS_DIR)/msl
-
 ifeq ($(LIBRARY_INTERMODULE),yes)
 
 INTERMODULE_OPTS = --transitive-intermodule-optimization
@@ -120,39 +102,14 @@
 
 #-----------------------------------------------------------------------------#
 
-NU_LIBRARY_NLS = \
-	io.nu.nl require.nu.nl std_util.nu.nl string.nu.nl term_io.nu.nl \
-	int.nu.nl float.nu.nl char.nu.nl mercury_builtin.nu.nl library.nu.nl \
-	store.nu.nl
-NU_OVERRIDING_LIBRARY_NLS = map.nu.nl assoc_list.nu.nl array.nu.nl
-NU_DEBUG_LIBRARY_NLS = portray.nl debug.nl error.nl
-
-NU_LIBRARY_NOS = $(NU_LIBRARY_NLS:%.nl=$(nos_subdir)%.no)
-NU_OVERRIDING_LIBRARY_NOS = $(NU_OVERRIDING_LIBRARY_NLS:%.nl=$(nos_subdir)%.no)
-NU_DEBUG_LIBRARY_NOS = $(NU_DEBUG_LIBRARY_NLS:%.nl=$(nos_subdir)%.no)
-
-NU_LIBRARY_QLS = $(NU_LIBRARY_NLS:%.nl=$(qls_subdir)%.ql) \
-	$(qls_subdir)sp_lib.ql
-NU_OVERRIDING_LIBRARY_QLS = $(NU_OVERRIDING_LIBRARY_NLS:%.nl=$(qls_subdir)%.ql)
-
-#-----------------------------------------------------------------------------#
-
 # targets
 
 .PHONY: all
-all : mercury nuprolog sicstus
+all : mercury
 
 .PHONY: mercury
 mercury : all-ints lib_std
 
-.PHONY: nuprolog
-nuprolog : all-ints library.nu library.nu.debug \
-			$(library.nos) $(NU_LIBRARY_NOS) \
-			$(NU_OVERRIDING_LIBRARY_NOS) nc_builtin.nl
-
-.PHONY: sicstus
-sicstus : all-ints sicstus_compile library.sicstus.debug
-
 #-----------------------------------------------------------------------------#
 
 .PHONY: depend
@@ -188,13 +145,6 @@
 
 #-----------------------------------------------------------------------------#
 
-library.nu.nl: library.nu.nl.in ../VERSION ../Mmake.common
-	sed	-e 's/@VERSION@/$(VERSION)/g' \
-		-e 's/@FULLARCH@/$(FULLARCH)/' \
-		library.nu.nl.in > library.nu.nl
-
-#-----------------------------------------------------------------------------#
-
 tags		: $(MTAGS) $(library.ms)
 	$(MTAGS) $(library.ms)
 
@@ -244,25 +194,6 @@
 
 #-----------------------------------------------------------------------------#
 
-# we need to add some manual dependencies, since the
-# automatic dependencies assume that the library
-# isn't part of the application, but in this case it is.
-
-library.nu library.nu.debug: $(NU_LIBRARY_NOS) $(NU_OVERRIDING_LIBRARY_NOS)
-library.sicstus library.sicstus.debug: $(qls_subdir)sp_builtin.ql \
-	$(NU_LIBRARY_QLS) $(NU_OVERRIDING_LIBRARY_QLS)
-
-library.nu.debug: $(nos_subdir)error.no $(nos_subdir)debug.no \
-	$(nos_subdir)portray.no
-library.sicstus library.sicstus.debug: $(qls_subdir)portray.ql
-
-sp_builtin.ql $(library.qls) $(NU_LIBRARY_QLS) $(NU_OVERRIDING_LIBRARY_QLS) \
-$(qls_subdir)portray.ql: sicstus_compile
-
-$(library.nos) $(NU_LIBRARY_NOS) $(NU_OVERRIDING_LIBRARY_NOS) \
-	$(nos_subdir)error.no $(nos_subdir)debug.no $(nos_subdir)portray.no: \
-	nc_builtin.nl
-
 # Ensure we recompile library__version if VERSION is changed.
 $(os_subdir)library.o \
 $(os_subdir)library.pic_o \
@@ -270,43 +201,8 @@
 
 #-----------------------------------------------------------------------------#
 
-sicstus_saved_state:
-	echo "save('$@')." | $(SP)
-
-sicstus_compile: sp_builtin.pl sicstus_saved_state
-	echo "\
-on_exception(Error, (						\
-	/* if we are using Sicstus 3, we need to turn off */	\
-	/* character escapes */					\
-	( prolog_flag(argv,_) ->				\
-		prolog_flag(character_escapes, _, off) 		\
-	;							\
-  		true                           			\
-	),                           				\
-	( prolog_flag(compiling, _, fastcode) -> true ; true ),	\
-	compile(sp_builtin),					\
-	garbage_collect,					\
-	save('$@', 1),						\
-	( prolog_flag(argv,Args) -> true ; unix(argv(Args)) ), 	\
-	( Args = [CompileMode|Files] ->				\
-		( prolog_flag(compiling, _, CompileMode) -> true ; true ), \
-		fcompile(Files)					\
-	;							\
-		true						\
-	)							\
-), print_message(error, Error)), halt ; halt.			\
-	" | ./sicstus_saved_state
-
-#-----------------------------------------------------------------------------#
-
-# We need to clean up the .no and .ql files for *.nu.nl, etc.
-
-clean:
-	rm -f $(nos_subdir)*.no $(qls_subdir)*.ql
-
 realclean:
 	rm -f lib$(STD_LIB_NAME).a lib$(STD_LIB_NAME).so $(STD_LIB_NAME).init
-	rm -f sicstus_saved_state sicstus_compile sp_builtin.pl
 	rm -f tags
 
 #-----------------------------------------------------------------------------#
@@ -322,10 +218,10 @@
 # case LIBRARY_INTERMODULE != yes.
 
 .PHONY: install
-install: install_mercury $(INSTALL_SICSTUS) $(INSTALL_NUPROLOG)
+install: install_mercury
 
 .PHONY: install_all
-install_all: install_mercury install_nuprolog install_sicstus
+install_all: install_mercury
 
 .PHONY: install_mercury
 install_mercury: install_ints install_init install_library
@@ -379,43 +275,6 @@
 	cp `vpath_find library.split.a` \
 		$(INSTALL_MERC_LIB_DIR)/lib$(STD_LIB_NAME).a
 
-.PHONY: install_nuprolog
-install_nuprolog: install_library_nu install_interpreter_nu
-
-.PHONY: install_library_nu
-install_library_nu: $(library.nos) $(NU_LIBRARY_NOS) \
-			$(NU_OVERRIDING_LIBRARY_NOS) \
-			$(nos_subdir)error.no $(nos_subdir)debug.no \
-			$(nos_subdir)portray.no nc_builtin.nl
-	[ -d $(INSTALL_NU_DIR) ] || mkdir -p $(INSTALL_NU_DIR)
-	cp `vpath_find nc_builtin.nl` $(INSTALL_NU_DIR)
-	[ -d $(INSTALL_NU_ARCH_DIR) ] || mkdir -p $(INSTALL_NU_ARCH_DIR)
-	cp `vpath_find $(library.nos) $(NU_LIBRARY_NOS) \
-		$(NU_OVERRIDING_LIBRARY_NOS) \
-		$(nos_subdir)error.no $(nos_subdir)debug.no \
-		$(nos_subdir)portray.no` $(INSTALL_NU_ARCH_DIR)
-
-.PHONY: install_interpreter_nu
-install_interpreter_nu: library.nu
-	[ -d $(INSTALL_NU_ARCH_DIR) ] || mkdir -p $(INSTALL_NU_ARCH_DIR)
-	sed "s^`pwd`^$(INSTALL_NU_ARCH_DIR)^g" `vpath_find library.nu` \
-		> $(INSTALL_NU_ARCH_DIR)/library.nu
-	-chmod +x $(INSTALL_NU_ARCH_DIR)/library.nu
-	cp `vpath_find library.nu.save` $(INSTALL_NU_ARCH_DIR)
-
-.PHONY: install_sicstus
-install_sicstus: install_interpreter_sicstus install_sicstus_compile
-
-.PHONY: install_interpreter_sicstus
-install_interpreter_sicstus: library.sicstus.debug
-	[ -d $(INSTALL_SP_ARCH_DIR) ] || mkdir -p $(INSTALL_SP_ARCH_DIR)
-	cp `vpath_find library.sicstus.debug` $(INSTALL_SP_ARCH_DIR)
-
-.PHONY: install_sicstus_compile
-install_sicstus_compile: sicstus_compile
-	[ -d $(INSTALL_SP_ARCH_DIR) ] || mkdir -p $(INSTALL_SP_ARCH_DIR)
-	cp `vpath_find sicstus_compile` $(INSTALL_SP_ARCH_DIR)
-
 else
 
 .PHONY: install
@@ -444,30 +303,6 @@
 
 .PHONY: install_split_library
 install_split_library:
-	echo "Can't do make install without LIBRARY_INTERMODULE=yes"
-
-.PHONY: install_nuprolog
-install_nuprolog:
-	echo "Can't do make install without LIBRARY_INTERMODULE=yes"
-
-.PHONY: install_library_nu
-install_library_nu:
-	echo "Can't do make install without LIBRARY_INTERMODULE=yes"
-
-.PHONY: install_interpreter_nu
-install_interpreter_nu:
-	echo "Can't do make install without LIBRARY_INTERMODULE=yes"
-
-.PHONY: install_sicstus
-install_sicstus:
-	echo "Can't do make install without LIBRARY_INTERMODULE=yes"
-
-.PHONY: install_interpreter_sicstus
-install_interpreter_sicstus:
-	echo "Can't do make install without LIBRARY_INTERMODULE=yes"
-
-.PHONY: install_sicstus_compile
-install_sicstus_compile:
 	echo "Can't do make install without LIBRARY_INTERMODULE=yes"
 
 endif
cvs diff: library/array.nu.nl was removed, no comparison available
cvs diff: library/assoc_list.nu.nl was removed, no comparison available
cvs diff: library/char.nu.nl was removed, no comparison available
cvs diff: library/float.nu.nl was removed, no comparison available
cvs diff: library/int.nu.nl was removed, no comparison available
cvs diff: library/io.nu.nl was removed, no comparison available
cvs diff: library/library.nu.nl.in was removed, no comparison available
cvs diff: library/map.nu.nl was removed, no comparison available
cvs diff: library/mercury_builtin.nu.nl was removed, no comparison available
cvs diff: library/nc_builtin.nl was removed, no comparison available
cvs diff: library/require.nu.nl was removed, no comparison available
cvs diff: library/sp_builtin.nl was removed, no comparison available
cvs diff: library/sp_lib.nl was removed, no comparison available
cvs diff: library/std_util.nu.nl was removed, no comparison available
cvs diff: library/store.nu.nl was removed, no comparison available
cvs diff: library/string.nu.nl was removed, no comparison available
cvs diff: library/swi_builtin.m was removed, no comparison available
cvs diff: library/swi_lib.m was removed, no comparison available
cvs diff: library/term_io.nu.nl was removed, no comparison available
cvs diff: scripts/mnc.in was removed, no comparison available
cvs diff: scripts/mnl.in was removed, no comparison available
cvs diff: scripts/mnp.in was removed, no comparison available
cvs diff: scripts/msc.in was removed, no comparison available
cvs diff: scripts/msl.in was removed, no comparison available
cvs diff: scripts/msp.in was removed, no comparison available
Index: w3/news/newsdb.inc
===================================================================
RCS file: /home/mercury1/repository/w3/news/newsdb.inc,v
retrieving revision 1.22
diff -u -r1.22 newsdb.inc
--- newsdb.inc	1999/03/07 14:02:35	1.22
+++ newsdb.inc	1999/03/14 04:49:24
@@ -17,6 +17,12 @@
 */
 
 $newsdb = array(
+"11 Mar 1999" => array("Prolog debuggers no longer supported",
+
+"We've removed the support for using a Prolog debugger on Mercury programs.
+Now that we have a working Mercury debugger, there's no longer any need to
+use a Prolog debugger for debugging Mercury code.
+"),
 
 "8 Mar 1999" => array("Interactive queries",
 

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