diff: library/*.m wrap long lines

Fergus Henderson fjh at hydra.cs.mu.oz.au
Fri Jul 25 13:11:04 AEST 1997


library/*.m:
	Wrap long lines, to avoid formatting problems in the
	automatically-generated library reference manual.

cvs diff: Diffing .
Index: assoc_list.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/assoc_list.m,v
retrieving revision 1.5
diff -u -r1.5 assoc_list.m
--- assoc_list.m	1997/07/01 04:04:27	1.5
+++ assoc_list.m	1997/07/25 01:20:15
@@ -33,7 +33,8 @@
 
 	% Zip together two lists; abort if they are of different lengths.
 
-:- pred assoc_list__from_corresponding_lists(list(K), list(V), assoc_list(K,V)).
+:- pred assoc_list__from_corresponding_lists(list(K), list(V),
+						assoc_list(K,V)).
 :- mode assoc_list__from_corresponding_lists(in, in, out) is det.
 
 	% Return the first member of each pair.
Index: bintree_set.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/bintree_set.m,v
retrieving revision 1.11
diff -u -r1.11 bintree_set.m
--- bintree_set.m	1996/10/24 22:12:55	1.11
+++ bintree_set.m	1997/07/25 01:20:36
@@ -141,7 +141,8 @@
 	% `set_intersect(SetA, SetB, Set)' is true iff `Set' is the
 	% intersection of `SetA' and `SetB'.
 
-:- pred bintree_set__intersect(bintree_set(T), bintree_set(T), bintree_set(T)).
+:- pred bintree_set__intersect(bintree_set(T), bintree_set(T),
+				bintree_set(T)).
 :- mode bintree_set__intersect(in, in, out) is det.
 
 %--------------------------------------------------------------------------%
Index: io.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/io.m,v
retrieving revision 1.129
diff -u -r1.129 io.m
--- io.m	1997/07/23 07:34:16	1.129
+++ io.m	1997/07/25 01:49:16
@@ -473,7 +473,8 @@
 %	For stdout this is the string "<standard output>".
 %	For stderr this is the string "<standard error>".
 
-:- pred io__output_stream_name(io__output_stream, string, io__state, io__state).
+:- pred io__output_stream_name(io__output_stream, string,
+				io__state, io__state).
 :- mode io__output_stream_name(in, out, di, uo) is det.
 %	Retrieves the human-readable name associated with the specified stream.
 %	For file streams, this is the filename.
@@ -541,7 +542,7 @@
 %		until eof or error.
 
 :- pred io__read_binary_file(io__input_stream, io__result(list(int)),
-							io__state, io__state).
+						io__state, io__state).
 :- mode io__read_binary_file(in, out, di, uo) is det.
 %		Reads all the bytes from the given binary input stream until
 %		eof or error.
@@ -593,7 +594,8 @@
 %		Writes several bytes to the current binary output stream.
 %		The bytes are taken from a string.
 
-:- pred io__write_bytes(io__binary_output_stream, string, io__state, io__state).
+:- pred io__write_bytes(io__binary_output_stream, string,
+				io__state, io__state).
 :- mode io__write_bytes(in, in, di, uo) is det.
 %		Writes several bytes to the specified binary output stream.
 %		The bytes are taken from a string.
@@ -602,18 +604,20 @@
 :- mode io__flush_binary_output(di, uo) is det.
 %	Flush the output buffer of the current binary output stream.
 
-:- pred io__flush_binary_output(io__binary_output_stream, io__state, io__state).
+:- pred io__flush_binary_output(io__binary_output_stream,
+				io__state, io__state).
 :- mode io__flush_binary_output(in, di, uo) is det.
 %	Flush the output buffer of the specified binary output stream.
 
 :- pred io__seek_binary(io__binary_stream, io__whence, int,
-		io__state, io__state).
+				io__state, io__state).
 :- mode io__seek_binary(in, in, in, di, uo) is det.
 %	Seek to an offset relative to Whence (documented above)
 %	on a specified binary stream. Attempting to seek on a
 %	pipe or tty results in implementation dependent behaviour.
 
-:- pred io__binary_stream_offset(io__binary_stream, int, io__state, io__state).
+:- pred io__binary_stream_offset(io__binary_stream, int,
+				io__state, io__state).
 :- mode io__binary_stream_offset(in, out, di, uo) is det.
 %	Returns the offset (in bytes) into the specified binary stream.
 
@@ -645,7 +649,8 @@
 %	io__close_binary_input(File, IO0, IO1).
 %		Closes an open binary input stream.
 
-:- pred io__binary_input_stream(io__binary_input_stream, io__state, io__state).
+:- pred io__binary_input_stream(io__binary_input_stream,
+			io__state, io__state).
 :- mode io__binary_input_stream(out, di, uo) is det.
 %		Retrieves the current binary input stream.
 %		Does not modify the IO state.
@@ -657,7 +662,8 @@
 %		Changes the current input stream to the stream specified.
 %		Returns the previous stream.
 
-:- pred io__stdin_binary_stream(io__binary_input_stream, io__state, io__state).
+:- pred io__stdin_binary_stream(io__binary_input_stream,
+			io__state, io__state).
 :- mode io__stdin_binary_stream(out, di, uo) is det.
 %		Retrieves the standard binary input stream.
 %		Does not modify the IO state.
@@ -708,19 +714,20 @@
 %		Attempts to open a file for binary appending.
 %		Result is either 'ok(Stream)' or 'error(ErrorCode)'.
 
-:- pred io__close_binary_output(io__binary_output_stream, io__state, io__state).
+:- pred io__close_binary_output(io__binary_output_stream,
+				io__state, io__state).
 :- mode io__close_binary_output(in, di, uo) is det.
 %	io__close_binary_output(File, IO0, IO1).
 %		Closes an open binary output stream.
 
 :- pred io__binary_output_stream(io__binary_output_stream,
-			io__state, io__state).
+				io__state, io__state).
 :- mode io__binary_output_stream(out, di, uo) is det.
 %		Retrieves the current binary output stream.
 %		Does not modify the IO state.
 
-:- pred io__stdout_binary_stream(io__binary_output_stream, io__state,
-				io__state).
+:- pred io__stdout_binary_stream(io__binary_output_stream,
+				io__state, io__state).
 :- mode io__stdout_binary_stream(out, di, uo) is det.
 %		Retrieves the standard binary output stream.
 %		Does not modify the IO state.
@@ -772,9 +779,10 @@
 %		
 %		Does not modify the IO state.
 
-% The io__state contains an integer used to record the program's exit status.
-% When the program finishes, it will return this exit status to the operating
-% system.  The following predicates can be used to get and set the exit status.
+% The io__state contains an integer used to record the program's exit
+% status.  When the program finishes, it will return this exit status to
+% the operating system.  The following predicates can be used to get and
+% set the exit status.
 
 :- pred io__get_exit_status(int, io__state, io__state).
 :- mode io__get_exit_status(out, di, uo) is det.
Index: list.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/list.m,v
retrieving revision 1.73
diff -u -r1.73 list.m
--- list.m	1997/06/13 08:44:25	1.73
+++ list.m	1997/07/25 01:31:13
@@ -367,8 +367,10 @@
 	% InList into OutList.  The final value of the acumulator is
 	% returned in End.
 :- pred list__map_foldl(pred(X, Y, Z, Z), list(X), list(Y), Z, Z).
-:- mode list__map_foldl(pred(in, out, di, uo) is det, in, out, di, uo) is det.
-:- mode list__map_foldl(pred(in, out, in, out) is det, in, out, in, out) is det.
+:- mode list__map_foldl(pred(in, out, di, uo) is det, in, out, di, uo)
+								is det.
+:- mode list__map_foldl(pred(in, out, in, out) is det, in, out, in, out)
+								is det.
 :- mode list__map_foldl(pred(in, out, in, out) is semidet, in, out, in, out)
                                                                 is semidet.
 
Index: multi_map.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/multi_map.m,v
retrieving revision 1.3
diff -u -r1.3 multi_map.m
--- multi_map.m	1997/06/30 17:23:29	1.3
+++ multi_map.m	1997/07/25 01:29:26
@@ -146,7 +146,8 @@
 
 	% Convert a pair of lists (which must be of the same length)
 	% to a multi_map.
-:- pred multi_map__from_corresponding_lists(list(K), list(V), multi_map(K, V)).
+:- pred multi_map__from_corresponding_lists(list(K), list(V),
+				multi_map(K, V)).
 :- mode multi_map__from_corresponding_lists(in, in, out) is det.
 
 	% Convert a pair of lists (which must be of the same length)
Index: relation.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/relation.m,v
retrieving revision 1.15
diff -u -r1.15 relation.m
--- relation.m	1997/05/21 02:16:22	1.15
+++ relation.m	1997/07/25 01:50:14
@@ -65,7 +65,8 @@
 :- mode relation__add_assoc_list(in, in, out) is det.
 
 	% relation__remove removes an element from the relation.
-:- pred relation__remove(relation(T), relation_key, relation_key, relation(T)).
+:- pred relation__remove(relation(T), relation_key, relation_key,
+		relation(T)).
 :- mode relation__remove(in, in, in, out) is det.
 
 	% relation__remove_assoc_list removes a list of elements
@@ -168,8 +169,9 @@
 	% providing we have already visited Visit0 nodes, 
 	% ie the reverse of Dfs from relation__dfs/5.
 	% Visit is Visit0 + DfsRev.
-:- pred relation__dfsrev(relation(T), relation_key,  set_bbbtree(relation_key), 
-		set_bbbtree(relation_key), list(relation_key)).
+:- pred relation__dfsrev(relation(T), relation_key,
+		set_bbbtree(relation_key), set_bbbtree(relation_key),
+		list(relation_key)).
 :- mode relation__dfsrev(in, in, in, out, out) is det.
 
 	% relation__is_dag(R) is true iff R is a directed acyclic graph.
Index: set_bbbtree.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/set_bbbtree.m,v
retrieving revision 1.8
diff -u -r1.8 set_bbbtree.m
--- set_bbbtree.m	1997/07/08 16:47:29	1.8
+++ set_bbbtree.m	1997/07/25 01:37:30
@@ -212,7 +212,8 @@
 	% `set_bbbtree__intersect(SetA, SetB, Set)' is true iff `Set' is the
 	% intersection of `SetA' and `SetB'.
 
-:- pred set_bbbtree__intersect(set_bbbtree(T), set_bbbtree(T), set_bbbtree(T)).
+:- pred set_bbbtree__intersect(set_bbbtree(T), set_bbbtree(T),
+					set_bbbtree(T)).
 :- mode set_bbbtree__intersect(in, in, out) is det.
 
 
@@ -220,7 +221,7 @@
 	% interscetion of the sets in `Sets'.
 
 :- pred set_bbbtree__power_intersect(set_bbbtree(set_bbbtree(T)),
-								set_bbbtree(T)).
+					set_bbbtree(T)).
 :- mode set_bbbtree__power_intersect(in, out) is det.
 
 
@@ -228,7 +229,8 @@
 	%  set containing all the elements of `SetA' except those that
 	% occur in `SetB'.
 
-:- pred set_bbbtree__difference(set_bbbtree(T), set_bbbtree(T), set_bbbtree(T)).
+:- pred set_bbbtree__difference(set_bbbtree(T), set_bbbtree(T),
+					set_bbbtree(T)).
 :- mode set_bbbtree__difference(in, in, out) is det.
 
 
@@ -248,6 +250,10 @@
 %------------------------------------------------------------------------------%
 %------------------------------------------------------------------------------%
 
+:- implementation.
+
+:- import_module int, require.
+
 % Implementation based on "Functional Pearls: Efficient sets - a balancing act"
 % by Stephen Adams, J. Functional Programming 3 (4): 553-561, Oct 1993.
 %
@@ -287,10 +293,6 @@
 % use of other set operations.
 %
 %------------------------------------------------------------------------------%
-
-:- implementation.
-
-:- import_module int, require.
 
 :- type set_bbbtree(T) --->
 				empty
Index: set_unordlist.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/set_unordlist.m,v
retrieving revision 1.9
diff -u -r1.9 set_unordlist.m
--- set_unordlist.m	1997/07/14 03:44:31	1.9
+++ set_unordlist.m	1997/07/25 01:38:20
@@ -94,7 +94,8 @@
 	% `set_unordlist__insert_list(Set0, Xs, Set)' is true iff `Set' is the
 	% union of `Set0' and the set containing only the members of `Xs'.
 
-:- pred set_unordlist__insert_list(set_unordlist(T), list(T), set_unordlist(T)).
+:- pred set_unordlist__insert_list(set_unordlist(T), list(T),
+					set_unordlist(T)).
 :- mode set_unordlist__insert_list(in, in, out) is det.
 
 	% `set_unordlist__delete(Set0, X, Set)' is true iff `Set' is the
@@ -110,7 +111,8 @@
 	% relative complement of `Set0' and the set containing only the members
 	% of `Xs'.
 
-:- pred set_unordlist__delete_list(set_unordlist(T), list(T), set_unordlist(T)).
+:- pred set_unordlist__delete_list(set_unordlist(T), list(T),
+					set_unordlist(T)).
 :- mode set_unordlist__delete_list(in, in, out) is det.
 
 	% `set_unordlist__remove(Set0, X, Set)' is true iff `Set0' contains `X',
@@ -126,7 +128,8 @@
 	% and `Set' is the relative complement of `Set0' and the set
 	% containing only the members of `Xs'.
 
-:- pred set_unordlist__remove_list(set_unordlist(T), list(T), set_unordlist(T)).
+:- pred set_unordlist__remove_list(set_unordlist(T), list(T),
+					set_unordlist(T)).
 :- mode set_unordlist__remove_list(in, in, out) is semidet.
 
 	% `set_unordlist__remove_least(Set0, X, Set)' is true iff `X' is the
Index: term.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/term.m,v
retrieving revision 1.73
diff -u -r1.73 term.m
--- term.m	1997/06/30 06:35:40	1.73
+++ term.m	1997/07/25 01:39:09
@@ -171,7 +171,8 @@
 %	term__apply_substitution(Term0, Substitution, Term) :
 %		apply substitution to Term0 and return the result in Term.
 
-:- pred term__apply_substitution_to_list(list(term), substitution, list(term)).
+:- pred term__apply_substitution_to_list(list(term), substitution,
+						list(term)).
 :- mode term__apply_substitution_to_list(in, in, out) is det.
 %	term__apply_substitution_to_list(TermList0, Substitution, TermList) :
 %		as above, except for a list of terms rather than a single term
Index: time.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/time.m,v
retrieving revision 1.9
diff -u -r1.9 time.m
--- time.m	1997/07/25 02:48:17	1.9
+++ time.m	1997/07/25 02:57:39
@@ -44,7 +44,8 @@
 % all solutions of Pred with input In Repeats times is returned as Time.
 
 :- pred benchmark_nondet(pred(T1, T2), T1, int, int, int).
-:- mode benchmark_nondet(pred(in, out) is nondet, in, out, in, out) is cc_multi.
+:- mode benchmark_nondet(pred(in, out) is nondet, in, out, in, out)
+	is cc_multi.
 
 :- implementation.
 
Index: tree234.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/tree234.m,v
retrieving revision 1.20
diff -u -r1.20 tree234.m
--- tree234.m	1997/05/21 02:16:30	1.20
+++ tree234.m	1997/07/25 01:45:49
@@ -54,7 +54,8 @@
 
 :- pred tree234__remove_smallest(tree234(K, V), K, V, tree234(K, V)).
 :- mode tree234__remove_smallest(di, uo, uo, uo) is semidet.
-% :- mode tree234__remove_smallest(di_tree234, out, out, uo_tree234) is semidet.
+% :- mode tree234__remove_smallest(di_tree234, out, out, uo_tree234)
+%	is semidet.
 :- mode tree234__remove_smallest(in, out, out, out) is semidet.
 
 :- pred tree234__keys(tree234(K, V), list(K)).
Index: varset.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/varset.m,v
retrieving revision 1.52
diff -u -r1.52 varset.m
--- varset.m	1997/06/25 04:38:50	1.52
+++ varset.m	1997/07/25 01:44:39
@@ -14,9 +14,8 @@
 % (These variables are object-level variables, and are represented
 % as ground terms, so it might help to think of them as "variable ids"
 % rather than variables.)
-% Associated with each variable there can be both a name and a value (binding).
-% [But at the moment, the rest of the code is only using varsets to store
-% names, not values.]
+% Associated with each variable there can be both a name and a value
+% (binding).
 %
 % There may be some design flaws in the relationship between varset.m,
 % term.m, and graph.m.  Once we have implemented unique modes and

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