[m-rev.] diff/for review: clean up library modules (part 1)

Julien Fischer juliensf at cs.mu.OZ.AU
Fri Jan 21 15:37:42 AEDT 2005


Estimated hours taken: 3.5
Branches: main

Make the positioning of descriptive comments conform
to the coding standard for the following library modules.

Convert preds to predmode syntax where possible.

Make the ordering of related predicates and functions
conform to the coding standard, where the descriptive
comment makes it possible to do that.

Other minor changes are listed below.

Julien.

library/bimap.m:
	Fix capitalisation of a few comments.

library/dir.m:
	s/throw an exception/throws an exception/.

library/exception.m:
	Fix the comment about the exception_result/1 type.
	There is only one type and an inst following the comment.

library/map.m:
	Remove the unique modes for map.set/4, map.delete/3 and
	map.delete_list/3.

library/rbtree.m:
	Remove the unique modes for rbtree.set/4, rbtree.delete/3,
	rbtree.remove/4, rbtree.remove_smallest/4 and rbtree.remove_largest/4.

library/tree234.m:
	Remove left over unique modes for preds.

library/set.m:
	XXX the ordering of procedures in this module is a bit strange.
library/set_bbbtree.m:
library/set_unordlist.m:
	Remove various unique modes for set operations like
	delete/3.  (Some of these were commented out anyway).

library/term_to_xml.m:
	Fix a spot where line width exceeded 79 characters.

library/array.m:
library/assoc_list.m:
library/random.m:
library/multi_map.m:
library/pqueue.m:
library/queue.m:
library/bool.m:
library/char.m:
library/construct.m:
library/counter.m:
library/deconstruct.m:
library/eqvclass.m:
library/gc.m:
library/io.m:
library/sparse_bitset.m:
library/stack.m:
library/std_util.m:
library/store.m:
library/string.m:
library/term.m:
library/term_io.m:
library/type_desc.m:
library/varset.m:
	As above.

Julien.

Index: library/array.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/array.m,v
retrieving revision 1.134
diff -u -r1.134 array.m
--- library/array.m	28 Sep 2004 02:09:14 -0000	1.134
+++ library/array.m	19 Jan 2005 04:44:46 -0000
@@ -101,12 +101,14 @@

 	% array__make_empty_array(Array) creates an array of size zero
 	% starting at lower bound 0.
+	%
 :- pred array__make_empty_array(array(T)::array_uo) is det.

 :- func array__make_empty_array = (array(T)::array_uo) is det.

 	% array__init(Size, Init, Array) creates an array
 	% with bounds from 0 to Size-1, with each element initialized to Init.
+	%
 :- pred array__init(int, T, array(T)).
 :- mode array__init(in, in, array_uo) is det.

@@ -117,6 +119,7 @@
 	% (It does the same thing as the predicate array__from_list/2.)
 	% The syntax `array([...])' is used to represent arrays
 	% for io__read, io__write, term_to_type, and type_to_term.
+	%
 :- func array(list(T)) = array(T).
 :- mode array(in) = array_uo is det.

@@ -124,6 +127,7 @@

 	% array__min returns the lower bound of the array.
 	% Note: in this implementation, the lower bound is always zero.
+	%
 :- pred array__min(array(_T), int).
 :- mode array__min(array_ui, out) is det.
 :- mode array__min(in, out) is det.
@@ -133,6 +137,7 @@
 :- mode array__min(in) = out is det.

 	% array__max returns the upper bound of the array.
+	%
 :- pred array__max(array(_T), int).
 :- mode array__max(array_ui, out) is det.
 :- mode array__max(in, out) is det.
@@ -143,6 +148,7 @@

 	% array__size returns the length of the array,
 	% i.e. upper bound - lower bound + 1.
+	%
 :- pred array__size(array(_T), int).
 :- mode array__size(array_ui, out) is det.
 :- mode array__size(in, out) is det.
@@ -153,12 +159,14 @@

 	% array__bounds returns the upper and lower bounds of an array.
 	% Note: in this implementation, the lower bound is always zero.
+	%
 :- pred array__bounds(array(_T), int, int).
 :- mode array__bounds(array_ui, out, out) is det.
 :- mode array__bounds(in, out, out) is det.

 	% array__in_bounds checks whether an index is in the bounds
 	% of an array.
+	%
 :- pred array__in_bounds(array(_T), int).
 :- mode array__in_bounds(array_ui, in) is semidet.
 :- mode array__in_bounds(in, in) is semidet.
@@ -167,6 +175,7 @@

 	% array__lookup returns the Nth element of an array.
 	% Throws an exception if the index is out of bounds.
+	%
 :- pred array__lookup(array(T), int, T).
 :- mode array__lookup(array_ui, in, out) is det.
 :- mode array__lookup(in, in, out) is det.
@@ -177,6 +186,7 @@

 	% array__semidet_lookup returns the Nth element of an array.
 	% It fails if the index is out of bounds.
+	%
 :- pred array__semidet_lookup(array(T), int, T).
 :- mode array__semidet_lookup(array_ui, in, out) is semidet.
 :- mode array__semidet_lookup(in, in, out) is semidet.
@@ -184,6 +194,7 @@
 	% array__set sets the nth element of an array, and returns the
 	% resulting array (good opportunity for destructive update ;-).
 	% Throws an exception if the index is out of bounds.
+	%
 :- pred array__set(array(T), int, T, array(T)).
 :- mode array__set(array_di, in, in, array_uo) is det.

@@ -193,6 +204,7 @@
 	% array__semidet_set sets the nth element of an array,
 	% and returns the resulting array.
 	% It fails if the index is out of bounds.
+	%
 :- pred array__semidet_set(array(T), int, T, array(T)).
 :- mode array__semidet_set(array_di, in, in, array_uo) is semidet.

@@ -201,6 +213,7 @@
 	% required to be unique, so the implementation may not be able to use
 	% destructive update.
 	% It is an error if the index is out of bounds.
+	%
 :- pred array__slow_set(array(T), int, T, array(T)).
 :- mode array__slow_set(array_ui, in, in, array_uo) is det.
 :- mode array__slow_set(in, in, in, array_uo) is det.
@@ -214,18 +227,21 @@
 	% required to be unique, so the implementation may not be able to use
 	% destructive update.
 	% It fails if the index is out of bounds.
+	%
 :- pred array__semidet_slow_set(array(T), int, T, array(T)).
 :- mode array__semidet_slow_set(array_ui, in, in, array_uo) is semidet.
 :- mode array__semidet_slow_set(in, in, in, array_uo) is semidet.

 	% Field selection for arrays.
 	% Array ^ elem(Index) = array__lookup(Array, Index).
+	%
 :- func array__elem(int, array(T)) = T.
 :- mode array__elem(in, array_ui) = out is det.
 :- mode array__elem(in, in) = out is det.

 	% Field update for arrays.
 	% (Array ^ elem(Index) := Value) = array__set(Array, Index, Value).
+	%
 :- func 'array__elem :='(int, array(T), T) = array(T).
 :- mode 'array__elem :='(in, array_di, in) = array_uo is det.

@@ -233,6 +249,7 @@

 	% array__copy(Array0, Array):
 	% Makes a new unique copy of an array.
+	%
 :- pred array__copy(array(T), array(T)).
 :- mode array__copy(array_ui, array_uo) is det.
 :- mode array__copy(in, array_uo) is det.
@@ -245,6 +262,7 @@
 	% The array is expanded or shrunk to make it fit
 	% the new size `Size'.  Any new entries are filled
 	% with `Init'.
+	%
 :- pred array__resize(array(T), int, T, array(T)).
 :- mode array__resize(array_di, in, in, array_uo) is det.

@@ -254,6 +272,7 @@
 	% array__shrink(Array0, Size, Array):
 	% The array is shrunk to make it fit the new size `Size'.
 	% Throws an exception if `Size' is larger than the size of `Array0'.
+	%
 :- pred array__shrink(array(T), int, array(T)).
 :- mode array__shrink(array_di, in, array_uo) is det.

@@ -263,6 +282,7 @@
 	% array__from_list takes a list,
 	% and returns an array containing those elements in
 	% the same order that they occurred in the list.
+	%
 :- pred array__from_list(list(T), array(T)).
 :- mode array__from_list(in, array_uo) is det.

@@ -272,6 +292,7 @@
 	% array__to_list takes an array and returns a list containing
 	% the elements of the array in the same order that they
 	% occurred in the array.
+	%
 :- pred array__to_list(array(T), list(T)).
 :- mode array__to_list(array_ui, out) is det.
 :- mode array__to_list(in, out) is det.
@@ -284,6 +305,7 @@
 	% index, and places those items in the array between these
 	% indices into a list.  It is an error if either index is
 	% out of bounds.
+	%
 :- pred array__fetch_items(array(T), int, int, list(T)).
 :- mode array__fetch_items(in, in, in, out) is det.

@@ -297,6 +319,7 @@
 	% equivalent to the given one in the ordering provided.
 	% Assumes the array is sorted according to this ordering.
 	% Fails if the element is not present.
+	%
 :- pred array__bsearch(array(T), T, comparison_pred(T), maybe(int)).
 :- mode array__bsearch(array_ui, in, in(comparison_pred), out) is det.
 :- mode array__bsearch(in, in, in(comparison_pred), out) is det.
@@ -307,6 +330,7 @@

 	% array__map(Closure, OldArray, NewArray) applys `Closure' to
 	% each of the elements of `OldArray' to create `NewArray'.
+	%
 :- pred array__map(pred(T1, T2), array(T1), array(T2)).
 :- mode array__map(pred(in, out) is det, array_di, array_uo) is det.

@@ -359,6 +383,7 @@
 :- mode array__random_permutation(array_di, array_uo, mdi, muo) is det.

 %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

 :- implementation.

Index: library/assoc_list.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/assoc_list.m,v
retrieving revision 1.14
diff -u -r1.14 assoc_list.m
--- library/assoc_list.m	15 Mar 2004 23:49:29 -0000	1.14
+++ library/assoc_list.m	18 Jan 2005 09:35:58 -0000
@@ -27,43 +27,43 @@
 :- type assoc_list(T)	==	list(pair(T,T)).

 	% Swap the two sides of the pairs in each member of the list.
-
+	%
 :- pred assoc_list__reverse_members(assoc_list(K, V)::in,
 	assoc_list(V, K)::out) is det.
 :- func assoc_list__reverse_members(assoc_list(K, V)) = assoc_list(V, K).

 	% Zip together two lists; abort if they are of different lengths.
-
+	%
 :- pred assoc_list__from_corresponding_lists(list(K)::in, list(V)::in,
 	assoc_list(K,V)::out) is det.
 :- func assoc_list__from_corresponding_lists(list(K), list(V))
 	= assoc_list(K,V).

 	% Return the first member of each pair.
-
+	%
 :- pred assoc_list__keys(assoc_list(K, V)::in, list(K)::out) is det.
 :- func assoc_list__keys(assoc_list(K, V)) = list(K).

 	% Return the second member of each pair.
-
+	%
 :- pred assoc_list__values(assoc_list(K, V)::in, list(V)::out) is det.
 :- func assoc_list__values(assoc_list(K, V)) = list(V).

 	% Return the two lists contain respectively the first and second member
 	% of each pair in the assoc_list.
-
+	%
 :- pred assoc_list__keys_and_values(assoc_list(K, V)::in,
 	list(K)::out, list(V)::out) is det.

 	% Find the first element of the association list that matches
 	% the given key, and return the associated value.
-
+	%
 :- pred assoc_list__search(assoc_list(K, V)::in, K::in, V::out) is semidet.

 	% Find the first element of the association list that matches
 	% the given key. Return the associated value, and the original
 	% list with the selected element removed.
-
+	%
 :- pred assoc_list__remove(assoc_list(K, V)::in, K::in, V::out,
 	assoc_list(K, V)::out) is semidet.

@@ -71,6 +71,7 @@
 	= assoc_list(K, W).

 %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

 :- implementation.

Index: library/bimap.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/bimap.m,v
retrieving revision 1.15
diff -u -r1.15 bimap.m
--- library/bimap.m	8 Sep 2004 22:59:21 -0000	1.15
+++ library/bimap.m	18 Jan 2005 09:38:44 -0000
@@ -29,10 +29,12 @@
 %-----------------------------------------------------------------------------%

 	% Initialize an empty bimap.
+	%
 :- pred bimap__init(bimap(_, _)::out) is det.
 :- func bimap__init = bimap(_, _).

 	% Check whether a bimap is empty.
+	%
 :- pred bimap__is_empty(bimap(_, _)::in) is semidet.

 :- pred bimap__search(bimap(K, V), K, V).
@@ -52,10 +54,12 @@
 :- func bimap__reverse_lookup(bimap(K, V), V) = K.

 	% Given a bimap, return a list of all the keys in the bimap.
+	%
 :- pred bimap__ordinates(bimap(K, _V)::in, list(K)::out) is det.
 :- func bimap__ordinates(bimap(K, _V)) = list(K).

 	% Given a bimap, return a list of all the data values in the bimap.
+	%
 :- pred bimap__coordinates(bimap(_K, V)::in, list(V)::out) is det.
 :- func bimap__coordinates(bimap(_K, V)) = list(V).

@@ -96,20 +100,24 @@

 	% Delete a key-value pair from a bimap. If the key is not present,
 	% leave the bimap unchanged.
+	%
 :- pred bimap__delete_key(K::in, bimap(K, V)::in, bimap(K, V)::out) is det.
 :- func bimap__delete_key(bimap(K, V), K) = bimap(K, V).

 	% Delete a key-value pair from a bimap. If the value is not present,
 	% leave the bimap unchanged.
+	%
 :- pred bimap__delete_value(V::in, bimap(K, V)::in, bimap(K, V)::out) is det.
 :- func bimap__delete_value(bimap(K, V), V) = bimap(K, V).

 	% Apply bimap__delete_key to a list of keys.
+	%
 :- pred bimap__delete_keys(list(K)::in, bimap(K, V)::in, bimap(K, V)::out)
 	is det.
 :- func bimap__delete_keys(bimap(K, V), list(K)) = bimap(K, V).

 	% Apply bimap__delete_value to a list of values.
+	%
 :- pred bimap__delete_values(list(V)::in, bimap(K, V)::in, bimap(K, V)::out)
 	is det.
 :- func bimap__delete_values(bimap(K, V), list(V)) = bimap(K, V).
@@ -117,15 +125,18 @@
 	% bimap__overlay(BIMapA, BIMapB, BIMap):
 	% Apply map__overlay to the forward maps of BIMapA and BIMapB,
 	% and compute the reverse map from the resulting map.
+	%
 :- pred bimap__overlay(bimap(K, V)::in, bimap(K, V)::in, bimap(K, V)::out)
 	is det.
 :- func bimap__overlay(bimap(K, V), bimap(K, V)) = bimap(K, V).

-	% convert a bimap to an association list
+	% Convert a bimap to an association list.
+	%
 :- pred bimap__to_assoc_list(bimap(K, V)::in, assoc_list(K, V)::out) is det.
 :- func bimap__to_assoc_list(bimap(K, V)) = assoc_list(K, V).

-	% convert an association list to a bimap
+	% Convert an association list to a bimap.
+	%
 :- pred bimap__from_assoc_list(assoc_list(K, V)::in, bimap(K, V)::out) is det.
 :- func bimap__from_assoc_list(assoc_list(K, V)) = bimap(K, V).

@@ -142,16 +153,19 @@
 :- func bimap__apply_reverse_map_to_list(bimap(K, V), list(V)) = list(K).

 	% Apply a transformation predicate to all the keys.
+	%
 :- pred bimap__map_keys(pred(V, K, L)::in(pred(in, in, out) is det),
 	bimap(K, V)::in, bimap(L, V)::out) is det.
 :- func bimap__map_keys(func(V, K) = L, bimap(K, V)) = bimap(L, V).

 	% Apply a transformation predicate to all the values.
+	%
 :- pred bimap__map_values(pred(K, V, W)::in(pred(in, in, out) is det),
 	bimap(K, V)::in, bimap(K, W)::out) is det.
 :- func bimap__map_values(func(K, V) = W, bimap(K, V)) = bimap(K, W).

 	% Apply a transformation predicate to all the values.
+	%
 :- pred bimap__foldl(pred(K, V, T, T), bimap(K, V), T, T).
 :- mode bimap__foldl(pred(in, in, di, uo) is det, in, di, uo) is det.
 :- mode bimap__foldl(pred(in, in, in, out) is det, in, in, out) is det.
@@ -163,6 +177,7 @@
 :- func bimap__reverse_map(bimap(K, V)) = map(V, K).

 %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

 :- implementation.

Index: library/bool.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/bool.m,v
retrieving revision 1.10
diff -u -r1.10 bool.m
--- library/bool.m	24 Nov 2004 08:46:28 -0000	1.10
+++ library/bool.m	18 Jan 2005 09:40:44 -0000
@@ -31,30 +31,26 @@
 :- instance enum(bool).

 :- func bool__or(bool, bool) = bool.
-:- pred bool__or(bool, bool, bool).
-:- mode bool__or(in, in, out) is det.
+:- pred bool__or(bool::in, bool::in, bool::out) is det.

 :- func bool__or_list(list(bool)) = bool.
-:- pred bool__or_list(list(bool), bool).
-:- mode bool__or_list(in, out) is det.
+:- pred bool__or_list(list(bool)::in, bool::out) is det.

 :- func bool__and(bool, bool) = bool.
-:- pred bool__and(bool, bool, bool).
-:- mode bool__and(in, in, out) is det.
+:- pred bool__and(bool::in, bool::in, bool::out) is det.

 :- func bool__and_list(list(bool)) = bool.
-:- pred bool__and_list(list(bool), bool).
-:- mode bool__and_list(in, out) is det.
+:- pred bool__and_list(list(bool)::in, bool::out) is det.

 :- func bool__not(bool) = bool.
-:- pred bool__not(bool, bool).
-:- mode bool__not(in, out) is det.
+:- pred bool__not(bool::in, bool::out) is det.

 	% pred_to_bool(P) = (if P then yes else no).
-:- func pred_to_bool((pred)) = bool.
-:- mode pred_to_bool((pred) is semidet) = out is det.
+	%
+:- func pred_to_bool((pred)::((pred) is semidet)) = (bool::out) is det.

 %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

 :- implementation.

Index: library/char.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/char.m,v
retrieving revision 1.47
diff -u -r1.47 char.m
--- library/char.m	6 Jan 2005 05:08:14 -0000	1.47
+++ library/char.m	18 Jan 2005 09:44:27 -0000
@@ -43,6 +43,7 @@
 	% to the standard output or standard error streams.
 	% For example, an implementation might represent characters
 	% using Unicode, but store files in an 8-bit national character set.
+	%
 :- func char__to_int(char) = int.
 :- pred char__to_int(char, int).
 :- mode char__to_int(in, out) is det.
@@ -51,78 +52,98 @@

 	% Converts an integer to its corresponding character, if any.
 	% A more expressive name for the reverse mode of char__to_int.
+	%
 :- pred char__from_int(int::in, char::out) is semidet.

 	% Converts an integer to its corresponding character. Aborts
 	% if there isn't one.
+	%
 :- pred char__det_from_int(int::in, char::out) is det.
 :- func char__det_from_int(int) = char.

 	% Returns the maximum numerical character code.
+	%
 :- func char__max_char_value = int.
 :- pred char__max_char_value(int::out) is det.

 	% Returns the minimum numerical character code.
+	%
 :- func char__min_char_value = int.
 :- pred char__min_char_value(int::out) is det.

 	% Convert a character to uppercase.
+	%
 :- func char__to_upper(char) = char.
 :- pred char__to_upper(char::in, char::out) is det.

 	% Convert a character to lowercase.
+	%
 :- func char__to_lower(char) = char.
 :- pred char__to_lower(char::in, char::out) is det.

 	% char__lower_upper(Lower, Upper) is true iff
 	% Lower is a lower-case letter and Upper is the corresponding
 	% upper-case letter.
+	%
 :- pred char__lower_upper(char, char).
 :- mode char__lower_upper(in, out) is semidet.
 :- mode char__lower_upper(out, in) is semidet.

 	% True iff the character is whitespace, i.e. a space, tab,
 	% newline, carriage return, form-feed, or vertical tab.
+	%
 :- pred char__is_whitespace(char::in) is semidet.

 	% True iff the character is an uppercase letter.
+	%
 :- pred char__is_upper(char::in) is semidet.

 	% True iff the character is a lowercase letter.
+	%
 :- pred char__is_lower(char::in) is semidet.

 	% True iff the character is a letter.
+	%
 :- pred char__is_alpha(char::in) is semidet.

 	% True iff the character is a letter or digit.
+	%
 :- pred char__is_alnum(char::in) is semidet.

 	% True iff the character is a letter or an underscore.
+	%
 :- pred char__is_alpha_or_underscore(char::in) is semidet.

 	% True iff the character is a letter, a digit or an underscore.
+	%
 :- pred char__is_alnum_or_underscore(char::in) is semidet.

 	% True iff the character is a decimal digit (0-9).
+	%
 :- pred char__is_digit(char::in) is semidet.

 	% True iff the character is a binary digit (0 or 1).
+	%
 :- pred char__is_binary_digit(char::in) is semidet.

 	% True iff the character is a octal digit (0-7).
+	%
 :- pred char__is_octal_digit(char::in) is semidet.

 	% True iff the character is a hexadecimal digit (0-9, a-f, A-F).
+	%
 :- pred char__is_hex_digit(char::in) is semidet.

 	% Succeeds if char is a decimal digit (0-9) or letter (a-z or A-Z).
 	% Returns the character's value as a digit (0-9 or 10-35).
+	%
 :- pred char__digit_to_int(char::in, int::out) is semidet.

 	% char__int_to_uppercase_digit(Int, DigitChar):
 	% True iff `Int' is an integer in the range 0-35 and
 	% `DigitChar' is a decimal digit or uppercase letter
 	% whose value as a digit is `Int'.
+	%
 :- pred char__int_to_digit(int, char).
 :- mode char__int_to_digit(in, out) is semidet.
 :- mode char__int_to_digit(out, in) is semidet.
@@ -130,6 +151,7 @@
 	% Returns a decimal digit or uppercase letter corresponding to the
 	% value.
 	% Calls error/1 if the integer is not in the range 0-35.
+	%
 :- func char__det_int_to_digit(int) = char.
 :- pred char__det_int_to_digit(int::in, char::out) is det.

Index: library/construct.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/construct.m,v
retrieving revision 1.18
diff -u -r1.18 construct.m
--- library/construct.m	14 Dec 2004 01:07:20 -0000	1.18
+++ library/construct.m	18 Jan 2005 09:45:09 -0000
@@ -62,6 +62,7 @@
     % for the specified type of the function symbol that is in position I
     % in lexicographic order. Fails if the type is not a discriminated
     % union type, or if I is out of range.
+    %
 :- pred get_functor_ordinal(type_desc__type_desc::in, int::in, int::out)
     is semidet.

@@ -81,9 +82,11 @@
     % construct_tuple(Args) = Term
     %
     % Returns a tuple whose arguments are given by Args.
+    %
 :- func construct_tuple(list(univ)) = univ.

 %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

 :- implementation.

Index: library/counter.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/counter.m,v
retrieving revision 1.2
diff -u -r1.2 counter.m
--- library/counter.m	10 Mar 2000 13:21:32 -0000	1.2
+++ library/counter.m	18 Jan 2005 09:46:14 -0000
@@ -23,16 +23,22 @@

 	% counter_init(N, Counter) returns a counter whose first allocation
 	% will be the integer N.
+	%
 :- pred counter__init(int::in, counter::out) is det.

 	% A function version of counter__init/2.
+	%
 :- func counter__init(int) = counter.

 	% counter__allocate(N, Counter0, Counter) takes a counter, and
 	% returns (a) the next integer to be allocated from that counter,
 	% and (b) the updated state of the counter.
+	%
 :- pred counter__allocate(int::out, counter::in, counter::out) is det.

+%-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
+
 :- implementation.

 :- import_module int.
Index: library/deconstruct.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/deconstruct.m,v
retrieving revision 1.28
diff -u -r1.28 deconstruct.m
--- library/deconstruct.m	23 Mar 2004 07:41:59 -0000	1.28
+++ library/deconstruct.m	18 Jan 2005 09:49:16 -0000
@@ -130,8 +130,8 @@
 	% arg_cc/3 is similar to arg/4, except that it
 	% handles arguments with non-canonical types.
 	% See the documentation of std_util__arg_cc.
-:- pred arg_cc(T, int, std_util__maybe_arg).
-:- mode arg_cc(in, in, out) is cc_multi.
+	%
+:- pred arg_cc(T::in, int::in, std_util__maybe_arg::out) is cc_multi.

 	% named_arg(Data, NonCanon, Name, Argument)
 	%
@@ -146,8 +146,8 @@

 	% named_arg_cc/3 is similar to named_arg/4, except that it
 	% handles arguments with non-canonical types.
-:- pred named_arg_cc(T, string, std_util__maybe_arg) is cc_multi.
-:- mode named_arg_cc(in, in, out) is cc_multi.
+	%
+:- pred named_arg_cc(T::in, string::in, std_util__maybe_arg::out) is cc_multi.

 	% det_arg(Data, NonCanon, Index, Argument)
 	%
@@ -211,8 +211,12 @@
 	is semidet.

 	% See the documentation of std_util__limited_deconstruct_cc.
-:- pred limited_deconstruct_cc(T, int, maybe({string, int, list(univ)})).
-:- mode limited_deconstruct_cc(in, in, out) is cc_multi.
+	%
+:- pred limited_deconstruct_cc(T::in, int::in,
+	maybe({string, int, list(univ)})::out) is cc_multi.
+
+%----------------------------------------------------------------------------%
+%----------------------------------------------------------------------------%

 :- implementation.
 :- interface.
Index: library/dir.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/dir.m,v
retrieving revision 1.24
diff -u -r1.24 dir.m
--- library/dir.m	7 Jul 2004 07:11:05 -0000	1.24
+++ library/dir.m	18 Jan 2005 10:08:39 -0000
@@ -32,21 +32,25 @@

 	% Returns the default separator between components of a pathname --
 	% '/' on Unix systems and '\\' on Microsoft Windows systems.
+	%
 :- func dir__directory_separator = character.
 :- pred dir__directory_separator(character::out) is det.

 	% Is the character a directory separator.
 	% On Microsoft Windows systems this will succeed for '/'
 	% as well as '\\'.
+	%
 :- pred dir__is_directory_separator(character).
 :- mode dir__is_directory_separator(in) is semidet.
 :- mode dir__is_directory_separator(out) is multi.

 	% Returns ".".
+	%
 :- func dir__this_directory = string.
 :- pred dir__this_directory(string::out) is det.

 	% Returns "..".
+	%
 :- func dir__parent_directory = string.
 :- pred dir__parent_directory(string::out) is det.

@@ -69,6 +73,7 @@
 	% Note that Cygwin doesn't support drive current directories,
 	% so `dir__split_name("C:foo, _, _)' will fail when running
 	% under Cygwin.
+	%
 :- pred dir__split_name(string::in, string::out, string::out) is semidet.

 	% dir__basename(PathName) = BaseName.
@@ -80,10 +85,12 @@
 	%
 	% Trailing slashes are removed from PathName before splitting,
 	% if that doesn't change the meaning of PathName.
+	%
 :- func dir__basename(string) = string is semidet.
 :- pred dir__basename(string::in, string::out) is semidet.

-	% As above, but throw an exception instead of failing.
+	% As above, but throws an exception instead of failing.
+	%
 :- func dir__basename_det(string) = string.

 	% dir__dirname(PathName) = DirName.
@@ -102,6 +109,7 @@
 	%
 	% Trailing slashes are removed from DirName after splitting,
 	% if that doesn't change the meaning of DirName.
+	%
 :- func dir__dirname(string) = string.
 :- pred dir__dirname(string::in, string::out) is det.

@@ -112,6 +120,7 @@
 	%
 	% An path is absolute iff it begins with a root directory
 	% (see dir__path_name_is_root_directory).
+	%
 :- pred dir__path_name_is_absolute(string::in) is semidet.

 	% dir__path_name_is_root_directory(PathName)
@@ -126,6 +135,7 @@
 	%
 	% Note that 'X:' is not a Windows root directory -- it specifies the
 	% current directory on drive X, where X is any letter.
+	%
 :- pred dir__path_name_is_root_directory(string::in) is semidet.

 	% PathName = DirName / FileName
@@ -141,6 +151,7 @@
 	% Throws an exception if FileName is an absolute path name.
 	% Throws an exception on Windows if FileName is a current
 	% drive relative path such as "C:".
+	%
 :- func string / string = string.
 :- func dir__make_path_name(string, string) = string.

@@ -149,11 +160,13 @@
 	% Make the given directory, and all parent directories.
 	% This will also succeed if the directory already exists
 	% and is readable and writable by the current user.
+	%
 :- pred dir__make_directory(string::in, io__res::out, io::di, io::uo) is det.

 	% Make only the given directory.
 	% Fails if the directory already exists, or the parent
 	% directory doesn't.
+	%
 :- pred dir__make_single_directory(string::in, io__res::out, io::di, io::uo)
 	is det.

@@ -164,6 +177,7 @@
 	% A predicate passed to dir__foldl2 to process each entry in
 	% a directory.
 	% Processing will stop if Continue is bound to `no'.
+	%
 :- type dir__foldl_pred(T) == pred(string, string, io__file_type, bool,
 					T, T, io, io).
 :- inst dir__foldl_pred == (pred(in, in, in, out, in, out, di, uo) is det).
@@ -175,6 +189,7 @@
 	% Processing will stop if the boolean (Continue) output of P is bound
 	% to `no'.
 	% The order in which the entries are processed is unspecified.
+	%
 :- pred dir__foldl2(dir__foldl_pred(T)::in(dir__foldl_pred), string::in,
 	T::in, io__maybe_partial_res(T)::out, io::di, io::uo) is det.

@@ -186,6 +201,7 @@
 	% the directory itself before its contents.
 	% If `FollowSymLinks' is `yes', recursively process the
 	% directories referenced by symbolic links.
+	%
 :- pred dir__recursive_foldl2(dir__foldl_pred(T)::in(dir__foldl_pred),
 	string::in, bool::in, T::in, io__maybe_partial_res(T)::out,
 	io::di, io::uo) is det.
@@ -212,9 +228,11 @@
 	%	Brace expansions may be nested. The results of each expanded
 	%	string are not sorted; left to right order is preserved.
 	%	For example, a{d,c,b}e expands into `ade ace abe'.
+	%
 :- func expand_braces(string) = list(string).

 %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

 :- implementation.

Index: library/eqvclass.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/eqvclass.m,v
retrieving revision 1.15
diff -u -r1.15 eqvclass.m
--- library/eqvclass.m	14 Jan 2005 06:04:22 -0000	1.15
+++ library/eqvclass.m	18 Jan 2005 10:10:33 -0000
@@ -21,18 +21,18 @@
 :- type eqvclass(T).

 	% Create an empty equivalance class.
-
+	%
 :- pred eqvclass__init(eqvclass(T)::out) is det.
 :- func eqvclass__init = eqvclass(T).

 	% Is this item known to the equivalence class?
-
+	%
 :- pred eqvclass__is_member(eqvclass(T)::in, T::in) is semidet.

 	% Make an element known to the equivalence class.
 	% The element may already be known to the class;
 	% if it isn't, it is created without any equivalence relationships.
-
+	%
 :- pred eqvclass__ensure_element(eqvclass(T)::in, T::in, eqvclass(T)::out)
 	is det.
 :- func eqvclass__ensure_element(eqvclass(T), T) = eqvclass(T).
@@ -40,72 +40,73 @@
 	% Make an element known to the equivalence class.
 	% The element must not already be known to the class;
 	% it is created without any equivalence relationships.
-
+	%
 :- pred eqvclass__new_element(eqvclass(T)::in, T::in, eqvclass(T)::out) is det.
 :- func eqvclass__new_element(eqvclass(T), T) = eqvclass(T).

 	% Make two elements of the equivalence class equivalent.
 	% It is ok if they already are.
-
+	%
 :- pred eqvclass__ensure_equivalence(eqvclass(T)::in, T::in, T::in,
 	eqvclass(T)::out) is det.
 :- func eqvclass__ensure_equivalence(eqvclass(T), T, T) = eqvclass(T).

 	% Make two elements of the equivalence class equivalent.
 	% It is an error if they are already equivalent.
-
+	%
 :- pred eqvclass__new_equivalence(eqvclass(T)::in, T::in, T::in,
 	eqvclass(T)::out) is det.
 :- func eqvclass__new_equivalence(eqvclass(T), T, T) = eqvclass(T).

 	% Test if two elements are equivalent.
-
+	%
 :- pred eqvclass__same_eqvclass(eqvclass(T)::in, T::in, T::in) is semidet.

 	% Test if a list of elements are equivalent.
-
+	%
 :- pred eqvclass__same_eqvclass_list(eqvclass(T)::in, list(T)::in) is semidet.

 	% Return the set of the partitions of the equivalence class.
-
+	%
 :- pred eqvclass__partition_set(eqvclass(T)::in, set(set(T))::out) is det.
 :- func eqvclass__partition_set(eqvclass(T)) = set(set(T)).

 	% Return a list of the partitions of the equivalence class.
-
+	%
 :- pred eqvclass__partition_list(eqvclass(T)::in, list(set(T))::out) is det.
 :- func eqvclass__partition_list(eqvclass(T)) = list(set(T)).

 	% Create an equivalence class from a partition set.
 	% It is an error if the sets are not disjoint.
-
+	%
 :- pred eqvclass__partition_set_to_eqvclass(set(set(T))::in, eqvclass(T)::out)
 	is det.
 :- func eqvclass__partition_set_to_eqvclass(set(set(T))) = eqvclass(T).

 	% Create an equivalence class from a list of partitions.
 	% It is an error if the sets are not disjoint.
-
+	%
 :- pred eqvclass__partition_list_to_eqvclass(list(set(T))::in,
 	eqvclass(T)::out) is det.
 :- func eqvclass__partition_list_to_eqvclass(list(set(T))) = eqvclass(T).

 	% Return the set of elements equivalent to the given element.
 	% This set will of course include the given element.
-
+	%
 :- func eqvclass__get_equivalent_elements(eqvclass(T), T) = set(T).

 	% Return the smallest element equivalent to the given element.
 	% This may or may not be the given element.
-
+	%
 :- func eqvclass__get_minimum_element(eqvclass(T), T) = T.

 	% Remove the given element and all other elements equivalent to it
 	% from the given equivalence class.
-
+	%
 :- func eqvclass__remove_equivalent_elements(eqvclass(T), T) = eqvclass(T).

-%---------------------------------------------------------------------------%
+%----------------------------------------------------------------------------%
+%----------------------------------------------------------------------------%

 :- implementation.

Index: library/exception.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.96
diff -u -r1.96 exception.m
--- library/exception.m	9 Dec 2004 17:20:57 -0000	1.96
+++ library/exception.m	18 Jan 2005 10:12:56 -0000
@@ -23,14 +23,11 @@

 	% throw(Exception):
 	%	Throw the specified exception.
+	%
+:- func throw(T) = _ is erroneous.
+:- pred throw(T::in) is erroneous.

-:- pred throw(T).
-:- mode throw(in) is erroneous.
-
-:- func throw(T) = _.
-:- mode throw(in) = out is erroneous.
-
-% The following types are used by try/3 and try/5.
+% The following type and inst are used by try/3 and try/5.

 :- type exception_result(T)
 	--->	succeeded(T)
@@ -56,7 +53,7 @@
 	%               ; not Goal(_), Result = failed
 	%               ; Result = exception(_)
 	%		).
-
+	%
 :- pred try(pred(T),		    exception_result(T)).
 :- mode try(pred(out) is det,       out(cannot_fail)) is cc_multi.
 :- mode try(pred(out) is semidet,   out)              is cc_multi.
@@ -78,7 +75,7 @@
 	%		( Goal(R, IO_0, IO), Result = succeeded(R)
 	%		; Result = exception(_)
 	%		).
-
+	%
 :- pred try_io(pred(T, io, io),
 	exception_result(T), io, io).
 :- mode try_io(pred(out, di, uo) is det,
@@ -89,7 +86,7 @@
 	% try_store(Goal, Result, Store_0, Store):
 	%
 	% Just like try_io, but for stores rather than io__states.
-
+	%
 :- pred try_store(pred(T, store(S), store(S)),
 	exception_result(T), store(S), store(S)).
 :- mode try_store(pred(out, di, uo) is det,
@@ -114,7 +111,7 @@
 	%		MaybeException = no,
 	%		all [S] (Goal(S) => list__member(S, Solutions))
 	%	).
-
+	%
 :- pred try_all(pred(T), maybe(univ), list(T)).
 :- mode try_all(pred(out) is det,     out, out(nil_or_singleton_list))
 	is cc_multi.
@@ -153,9 +150,8 @@
 	%				list__member(succeeded(R),
 	%					ResultList)),
 	%		).
-
+	%
 :- pragma obsolete(exception.try_all/2).
-
 :- pred try_all(pred(T), list(exception_result(T))).
 :- mode try_all(pred(out) is det,     out(try_all_det))     is cc_multi.
 :- mode try_all(pred(out) is semidet, out(try_all_semidet)) is cc_multi.
@@ -186,7 +182,7 @@
 	% Operationally, however, incremental_try_all/5 will call
 	% AccumulatorPred for each solution as it is obtained, rather than
 	% first building a list of the solutions.
-
+	%
 :- pred incremental_try_all(pred(T), pred(exception_result(T), A, A), A, A).
 :- mode incremental_try_all(pred(out) is nondet,
 	pred(in, di, uo) is det, di, uo) is cc_multi.
@@ -196,7 +192,7 @@
 	% rethrow(ExceptionResult):
 	% Rethrows the specified exception result (which should be
 	% of the form `exception(_)', not `succeeded(_)' or `failed'.).
-
+	%
 :- pred rethrow(exception_result(T)).
 :- mode rethrow(in(bound(exception(ground)))) is erroneous.

@@ -212,7 +208,7 @@
 	% is called, unless Cleanup throws an exception.
 	% This predicate performs the same function as the `finally'
 	% clause (`try {...} finally {...}') in languages such as Java.
-
+	%
 :- pred finally(pred(T, io, io), T, pred(io__res, io, io), io__res, io, io).
 :- mode finally(pred(out, di, uo) is det, out,
 	pred(out, di, uo) is det, out, di, uo) is det.
@@ -229,7 +225,7 @@
 	% The predicate is impure instead of semipure because its effect
 	% depends not only on the execution of other impure predicates,
 	% but all calls.
-
+	%
 :- type near_stack_limits ---> near_stack_limits.

 :- impure pred throw_if_near_stack_limits is det.
Index: library/gc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/gc.m,v
retrieving revision 1.15
diff -u -r1.15 gc.m
--- library/gc.m	15 Mar 2004 06:50:15 -0000	1.15
+++ library/gc.m	18 Jan 2005 10:13:32 -0000
@@ -19,15 +19,18 @@
 :- import_module io.

 	% Force a garbage collection.
+	%
 :- pred garbage_collect(io__state::di, io__state::uo) is det.

 	% Force a garbage collection.
 	% Note that this version is not really impure, but it needs to be
 	% declared impure to ensure that the compiler won't try to
 	% optimize it away.
+	%
 :- impure pred garbage_collect is det.

 %---------------------------------------------------------------------------%
+%---------------------------------------------------------------------------%

 :- implementation.

Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.326
diff -u -r1.326 io.m
--- library/io.m	16 Aug 2004 03:51:05 -0000	1.326
+++ library/io.m	20 Jan 2005 05:45:54 -0000
@@ -29,36 +29,37 @@
 :- import_module bool, char, string, std_util, list, map, time, deconstruct.

 %-----------------------------------------------------------------------------%
-
+%
 % Exported types
-
+%
 	% The state of the universe.
-
+	%
 :- type io__state.

 	% An alternative, more concise name for `io__state'.
-
+	%
 :- type io__io == io__state.

 	% Opaque handles for text I/O streams.
-
+	%
 :- type io__input_stream.

 :- type io__output_stream.

 	% Opaque handles for binary I/O streams.
-
+	%
 :- type io__binary_input_stream		==	io__binary_stream.

 :- type io__binary_output_stream	==	io__binary_stream.

 :- type io__binary_stream.

-	% a unique identifier for an IO stream
+	% A unique identifier for an IO stream.
+	%
 :- type io__stream_id.

-	% Various types used for the result from the access predicates
-
+	% Various types used for the result from the access predicates.
+	%
 :- type io__res
 	--->	ok
 	;	error(io__error).
@@ -106,37 +107,44 @@
 	;	end.

 %-----------------------------------------------------------------------------%
-
+%
 % Text input predicates.
-
+%
 	% Reads a character from the current input stream.
+	%
 :- pred io__read_char(io__result(char)::out, io::di, io::uo) is det.

 	% Reads a whitespace delimited word from the current input stream.
+	%
 :- pred io__read_word(io__result(list(char))::out, io::di, io::uo) is det.

 	% Reads a line from the current input stream, returns the
 	% the result as a list of chars.
+	%
 :- pred io__read_line(io__result(list(char))::out, io::di, io::uo) is det.

 	% Reads a line from the current input stream, returns the
 	% result as a string.
+	%
 :- pred io__read_line_as_string(io__result(string)::out, io::di, io::uo)
 	is det.

 	% Reads all the characters from the current input stream until
 	% eof or error.
+	%
 :- pred io__read_file(io__maybe_partial_res(list(char))::out, io::di, io::uo)
 	is det.

 	% Reads all the characters from the current input stream until
 	% eof or error.  Returns the result as a string rather than
 	% as a list of char.
+	%
 :- pred io__read_file_as_string(io__maybe_partial_res(string)::out,
 	io::di, io::uo) is det.

 	% Applies the given closure to each character read from
 	% the input stream in turn, until eof or error.
+	%
 :- pred io__input_stream_foldl(pred(char, T, T), T, io__maybe_partial_res(T),
 	io, io).
 :- mode io__input_stream_foldl((pred(in, in, out) is det), in, out,
@@ -146,6 +154,7 @@

 	% Applies the given closure to each character read from
 	% the input stream in turn, until eof or error.
+	%
 :- pred io__input_stream_foldl_io(pred(char, io, io), io__res, io, io).
 :- mode io__input_stream_foldl_io((pred(in, di, uo) is det), out, di, uo)
 	is det.
@@ -154,6 +163,7 @@

 	% Applies the given closure to each character read from
 	% the input stream in turn, until eof or error.
+	%
 :- pred io__input_stream_foldl2_io(pred(char, T, T, io, io),
 	T, io__maybe_partial_res(T), io, io).
 :- mode io__input_stream_foldl2_io((pred(in, in, out, di, uo) is det),
@@ -164,6 +174,7 @@
 	% Applies the given closure to each character read from
 	% the input stream in turn, until eof or error, or the
 	% closure returns `no' as its second argument.
+	%
 :- pred io__input_stream_foldl2_io_maybe_stop(
 	pred(char, bool, T, T, io, io),
 	T, io__maybe_partial_res(T), io, io).
@@ -181,39 +192,47 @@
 	% On some systems only one character of pushback is guaranteed.
 	% `io__putback_char' will throw an io__error exception
 	% if ungetc() fails.
+	%
 :- pred io__putback_char(char::in, io::di, io::uo) is det.

 	% Reads a character from specified stream.
+	%
 :- pred io__read_char(io__input_stream::in, io__result(char)::out,
 	io::di, io::uo) is det.

 	% Reads a whitespace delimited word from specified stream.
+	%
 :- pred io__read_word(io__input_stream::in, io__result(list(char))::out,
 	io::di, io::uo) is det.

 	% Reads a line from specified stream, returning the result
 	% as a list of chars.
+	%
 :- pred io__read_line(io__input_stream::in, io__result(list(char))::out,
 	io::di, io::uo) is det.

 	% Reads a line from specified stream, returning the
 	% result as a string.
+	%
 :- pred io__read_line_as_string(io__input_stream::in, io__result(string)::out,
 	io::di, io::uo) is det.

 	% Reads all the characters from the given input stream until
 	% eof or error.
+	%
 :- pred io__read_file(io__input_stream::in,
 	io__maybe_partial_res(list(char))::out, io::di, io::uo) is det.

 	% Reads all the characters from the given input stream until
 	% eof or error.  Returns the result as a string rather than
 	% as a list of char.
+	%
 :- pred io__read_file_as_string(io__input_stream::in,
 	io__maybe_partial_res(string)::out, io::di, io::uo) is det.

 	% Applies the given closure to each character read from
 	% the input stream in turn, until eof or error.
+	%
 :- pred io__input_stream_foldl(io__input_stream, pred(char, T, T),
 	T, io__maybe_partial_res(T), io, io).
 :- mode io__input_stream_foldl(in, in(pred(in, in, out) is det),
@@ -223,6 +242,7 @@

 	% Applies the given closure to each character read from
 	% the input stream in turn, until eof or error.
+	%
 :- pred io__input_stream_foldl_io(io__input_stream, pred(char, io, io),
 	io__res, io, io).
 :- mode io__input_stream_foldl_io(in, in(pred(in, di, uo) is det),
@@ -232,6 +252,7 @@

 	% Applies the given closure to each character read from
 	% the input stream in turn, until eof or error.
+	%
 :- pred io__input_stream_foldl2_io(io__input_stream,
 	pred(char, T, T, io, io),
 	T, io__maybe_partial_res(T), io, io).
@@ -245,6 +266,7 @@
 	% Applies the given closure to each character read from
 	% the input stream in turn, until eof or error, or the
 	% closure returns `no' as its second argument.
+	%
 :- pred io__input_stream_foldl2_io_maybe_stop(io__input_stream,
 	pred(char, bool, T, T, io, io),
 	T, io__maybe_partial_res(T), io, io).
@@ -262,6 +284,7 @@
 	% On some systems only one character of pushback is guaranteed.
 	% `io__putback_char' will throw an io__error exception
 	% if ungetc() fails.
+	%
 :- pred io__putback_char(io__input_stream::in, char::in, io::di, io::uo)
 	is det.

@@ -286,6 +309,7 @@
 	% or if the term is not a valid term of the appropriate type,
 	% or if an I/O error is encountered, then it returns
 	% `error(Message, LineNumber)'.
+	%
 :- pred io__read(io__read_result(T)::out, io::di, io::uo) is det.
 :- pred io__read(io__input_stream::in, io__read_result(T)::out, io::di, io::uo)
 	is det.
@@ -311,19 +335,24 @@
 	% of the String.)
 	% WARNING: if MaxPos > length of String then the behaviour
 	% is UNDEFINED.
+	%
 :- pred io__read_from_string(string::in, string::in, int::in,
 	io__read_result(T)::out, posn::in, posn::out) is det.

 	% Discards all the whitespace from the current stream.
+	%
 :- pred io__ignore_whitespace(io__result::out, io::di, io::uo) is det.

 	% Discards all the whitespace from the specified stream.
+	%
 :- pred io__ignore_whitespace(io__input_stream::in, io__result::out,
 	io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
+%
 % Text output predicates.
+%
+
 % These will all throw an io__error exception if an I/O error occurs.

 	% io__print/3 writes its argument to the standard output stream.
@@ -356,7 +385,7 @@
 	% some implementations may not be able to print all the details
 	% for higher-order types or types defined using the foreign
 	% language interface.
-
+	%
 :- pred io__print(T::in, io::di, io::uo) is det.

 :- pred io__print(io__output_stream::in, T::in, io::di, io::uo) is det.
@@ -394,7 +423,7 @@
 	% the caller to specify how non-canonical types should be handled.
 	% io__write_cc/3 is the same as io__write/3 except that it
 	% specifies `include_details_cc' rather than `canonicalize'.
-
+	%
 :- pred io__write(T::in, io::di, io::uo) is det.

 :- pred io__write(io__output_stream::in, T::in, io::di, io::uo) is det.
@@ -409,65 +438,82 @@
 :- pred io__write_cc(T::in, io::di, io::uo) is cc_multi.

 	% Writes a newline character to the current output stream.
+	%
 :- pred io__nl(io::di, io::uo) is det.

 	% Writes a newline character to the specified output stream.
+	%
 :- pred io__nl(io__output_stream::in, io::di, io::uo) is det.

 	% Writes a string to the current output stream.
+	%
 :- pred io__write_string(string::in, io::di, io::uo) is det.

 	% Writes a string to the specified output stream.
+	%
 :- pred io__write_string(io__output_stream::in, string::in, io::di, io::uo)
 	is det.

 	% Writes a list of strings to the current output stream.
+	%
 :- pred io__write_strings(list(string)::in, io::di, io::uo) is det.

 	% Writes a list of strings to the specified output stream.
+	%
 :- pred io__write_strings(io__output_stream::in, list(string)::in,
 	io::di, io::uo) is det.

 	% Writes a character to the current output stream.
+	%
 :- pred io__write_char(char::in, io::di, io::uo) is det.

 	% Writes a character to the specified output stream.
+	%
 :- pred io__write_char(io__output_stream::in, char::in, io::di, io::uo) is det.

 	% Writes an integer to the current output stream.
+	%
 :- pred io__write_int(int::in, io::di, io::uo) is det.

 	% Writes an integer to the specified output stream.
+	%
 :- pred io__write_int(io__output_stream::in, int::in, io::di, io::uo) is det.

 	% Writes a floating point number to the current output stream.
+	%
 :- pred io__write_float(float::in, io::di, io::uo) is det.

 	% Writes a floating point number to the specified output stream.
+	%
 :- pred io__write_float(io__output_stream::in, float::in, io::di, io::uo)
 	is det.

 	% Formats the specified arguments according to the format string,
 	% using string__format, and then writes the result to the current
 	% output stream. (See the documentation of string__format for details.)
+	%
 :- pred io__format(string::in, list(io__poly_type)::in, io::di, io::uo) is det.

 	% Formats the specified argument list according to the format string,
 	% using string__format, and then writes the result to the specified
 	% output stream. (See the documentation of string__format for details.)
+	%
 :- pred io__format(io__output_stream::in, string::in, list(io__poly_type)::in,
 	io::di, io::uo) is det.

 	% Writes the specified arguments to the current output stream.
+	%
 :- pred io__write_many(list(io__poly_type)::in, io::di, io::uo) is det.

 	% Writes the specified arguments to the specified output stream.
+	%
 :- pred io__write_many(io__output_stream::in, list(io__poly_type)::in,
 	io::di, io::uo) is det.

 	% io__write_list(List, Separator, OutputPred, !IO):
 	% applies OutputPred to each element of List, printing Separator
 	% between each element. Outputs to the current output stream.
+	%
 :- pred io__write_list(list(T), string, pred(T, io, io), io, io).
 :- mode io__write_list(in, in, pred(in, di, uo) is det, di, uo) is det.
 :- mode io__write_list(in, in, pred(in, di, uo) is cc_multi, di, uo)
@@ -476,6 +522,7 @@
 	% io__write_list(Stream, List, Separator, OutputPred, !IO):
 	% applies OutputPred to each element of List, printing Separator
 	% between each element. Outputs to Stream.
+	%
 :- pred io__write_list(io__output_stream, list(T), string,
 	pred(T, io, io), io, io).
 :- mode io__write_list(in, in, in, pred(in, di, uo) is det, di, uo) is det.
@@ -483,126 +530,151 @@
 	is cc_multi.

 	% Flush the output buffer of the current output stream.
+	%
 :- pred io__flush_output(io::di, io::uo) is det.

 	% Flush the output buffer of the specified output stream.
+	%
 :- pred io__flush_output(io__output_stream::in, io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
+%
 % Input text stream predicates.
+%

 	% io__see(File, Result, !IO):
 	% Attempts to open a file for input, and if successful,
 	% sets the current input stream to the newly opened stream.
 	% Result is either 'ok' or 'error'.
+	%
 :- pred io__see(string::in, io__res::out, io::di, io::uo) is det.

 	% Closes the current input stream.
 	% The current input stream reverts to standard input.
 	% This will throw an io__error exception
 	% if an I/O error occurs.
+	%
 :- pred io__seen(io::di, io::uo) is det.

 	% Attempts to open a file for input.
 	% Result is either 'ok(Stream)' or 'error(ErrorCode)'.
+	%
 :- pred io__open_input(string::in, io__res(io__input_stream)::out,
 	io::di, io::uo) is det.

 	% Closes an open input stream.
 	% This will throw an io__error exception
 	% if an I/O error occurs.
+	%
 :- pred io__close_input(io__input_stream::in, io::di, io::uo) is det.

 	% Retrieves the current input stream.
 	% Does not modify the IO state.
+	%
 :- pred io__input_stream(io__input_stream::out, io::di, io::uo) is det.

 	% io__set_input_stream(NewStream, OldStream, !IO):
 	% Changes the current input stream to the stream specified.
 	% Returns the previous stream.
+	%
 :- pred io__set_input_stream(io__input_stream::in, io__input_stream::out,
 	io::di, io::uo) is det.

 	% Retrieves the standard input stream.
 	% Does not modify the IO state.
+	%
 :- pred io__stdin_stream(io__input_stream::out, io::di, io::uo) is det.

 	% Retrieves the human-readable name associated with the current input
 	% stream.
 	% For file streams, this is the filename.
 	% For stdin this is the string "<standard input>".
+	%
 :- pred io__input_stream_name(string::out, io::di, io::uo) is det.

 	% Retrieves the human-readable name associated with the specified input
 	% stream.
 	% For file streams, this is the filename.
 	% For stdin this is the string "<standard input>".
+	%
 :- pred io__input_stream_name(io__input_stream::in, string::out,
 	io::di, io::uo) is det.

 	% Return the line number of the current input stream.
 	% Lines are normally numbered starting at 1
 	% (but this can be overridden by calling io__set_line_number).
+	%
 :- pred io__get_line_number(int::out, io::di, io::uo) is det.

 	% Return the line number of the specified input stream.
 	% Lines are normally numbered starting at 1
 	% (but this can be overridden by calling io__set_line_number).
+	%
 :- pred io__get_line_number(io__input_stream::in, int::out, io::di, io::uo)
 	is det.

 	% Set the line number of the current input stream.
+	%
 :- pred io__set_line_number(int::in, io::di, io::uo) is det.

 	% Set the line number of the specified input stream.
+	%
 :- pred io__set_line_number(io__input_stream::in, int::in, io::di, io::uo)
 	is det.

 %-----------------------------------------------------------------------------%
-
+%
 % Output text stream predicates.
-
+%
 	% Attempts to open a file for output, and if successful
 	% sets the current output stream to the newly opened stream.
 	% As per Prolog tell/1. Result is either 'ok' or 'error(ErrCode)'.
+	%
 :- pred io__tell(string::in, io__res::out, io::di, io::uo) is det.

 	% Closes the current output stream; the default output stream
 	% reverts to standard output. As per Prolog told/0.
 	% This will throw an io__error exception if an I/O error occurs.
+	%
 :- pred io__told(io::di, io::uo) is det.

 	% Attempts to open a file for output.
 	% Result is either 'ok(Stream)' or 'error(ErrorCode)'.
+	%
 :- pred io__open_output(string::in, io__res(io__output_stream)::out,
 	io::di, io::uo) is det.

 	% Attempts to open a file for appending.
 	% Result is either 'ok(Stream)' or 'error(ErrorCode)'.
+	%
 :- pred io__open_append(string::in, io__res(io__output_stream)::out,
 	io::di, io::uo) is det.

 	% Closes an open output stream.
 	% This will throw an io__error exception if an I/O error occurs.
+	%
 :- pred io__close_output(io__output_stream::in, io::di, io::uo) is det.

 	% Retrieves the current output stream.
 	% Does not modify the IO state.
+	%
 :- pred io__output_stream(io__output_stream::out, io::di, io::uo) is det.

 	% io__set_output_stream(NewStream, OldStream, !IO):
 	% Changes the current output stream to the stream specified.
 	% Returns the previous stream.
+	%
 :- pred io__set_output_stream(io__output_stream::in, io__output_stream::out,
 	io::di, io::uo) is det.

 	% Retrieves the standard output stream.
 	% Does not modify the IO state.
+	%
 :- pred io__stdout_stream(io__output_stream::out, io::di, io::uo) is det.

 	% Retrieves the standard error stream.
 	% Does not modify the IO state.
+	%
 :- pred io__stderr_stream(io__output_stream::out, io::di, io::uo) is det.

 	% Retrieves the human-readable name associated with the current
@@ -610,6 +682,7 @@
 	% For file streams, this is the filename.
 	% For stdout this is the string "<standard output>".
 	% For stderr this is the string "<standard error>".
+	%
 :- pred io__output_stream_name(string::out, io::di, io::uo) is det.

 	% Retrieves the human-readable name associated with the specified
@@ -617,33 +690,40 @@
 	% For file streams, this is the filename.
 	% For stdout this is the string "<standard output>".
 	% For stderr this is the string "<standard error>".
+	%
 :- pred io__output_stream_name(io__output_stream::in, string::out,
 	io::di, io::uo) is det.

 	% Return the line number of the current output stream.
 	% Lines are normally numbered starting at 1
 	% (but this can be overridden by calling io__set_output_line_number).
+	%
 :- pred io__get_output_line_number(int::out, io::di, io::uo) is det.

 	% Return the line number of the specified output stream.
 	% Lines are normally numbered starting at 1
 	% (but this can be overridden by calling io__set_output_line_number).
+	%
 :- pred io__get_output_line_number(io__output_stream::in, int::out,
 	io::di, io::uo) is det.

 	% Set the line number of the current output stream.
+	%
 :- pred io__set_output_line_number(int::in, io::di, io::uo) is det.

 	% Set the line number of the specified output stream.
+	%
 :- pred io__set_output_line_number(io__output_stream::in, int::in,
 	io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
+%
 % Binary input predicates.
+%

 	% Reads a binary representation of a term of type T
 	% from the current binary input stream.
+	%
 :- pred io__read_binary(io__result(T)::out, io::di, io::uo) is det.

 	% Reads a binary representation of a term of type T
@@ -657,28 +737,34 @@
 	%
 	% XXX Note also that due to the current implementation,
 	% io__read_binary will not work for the Java back-end.
+	%
 :- pred io__read_binary(io__binary_input_stream::in, io__result(T)::out,
 	io::di, io::uo) is det.

 	% Reads a single 8-bit byte from the current binary input stream.
+	%
 :- pred io__read_byte(io__result(int)::out, io::di, io::uo) is det.

 	% Reads a single 8-bit byte from the specified binary input stream.
+	%
 :- pred io__read_byte(io__binary_input_stream::in, io__result(int)::out,
 	io::di, io::uo) is det.

 	% Reads all the bytes from the current binary input stream
 	% until eof or error.
+	%
 :- pred io__read_binary_file(io__result(list(int))::out, io::di, io::uo)
 	is det.

 	% Reads all the bytes from the given binary input stream until
 	% eof or error.
+	%
 :- pred io__read_binary_file(io__input_stream::in, io__result(list(int))::out,
 	io::di, io::uo) is det.

 	% Applies the given closure to each byte read from the
 	% current binary input stream in turn, until eof or error.
+	%
 :- pred io__binary_input_stream_foldl(pred(int, T, T),
 	T, io__maybe_partial_res(T), io, io).
 :- mode io__binary_input_stream_foldl((pred(in, in, out) is det),
@@ -688,6 +774,7 @@

 	% Applies the given closure to each byte read from the
 	% current binary input stream in turn, until eof or error.
+	%
 :- pred io__binary_input_stream_foldl_io(pred(int, io, io),
 	io__res, io, io).
 :- mode io__binary_input_stream_foldl_io((pred(in, di, uo) is det),
@@ -697,6 +784,7 @@

 	% Applies the given closure to each byte read from the
 	% current binary input stream in turn, until eof or error.
+	%
 :- pred io__binary_input_stream_foldl2_io(
 	pred(int, T, T, io, io),
 	T, io__maybe_partial_res(T), io, io).
@@ -710,6 +798,7 @@
 	% Applies the given closure to each byte read from the
 	% current binary input stream in turn, until eof or error,
 	% or the closure returns `no' as its second argument.
+	%
 :- pred io__binary_input_stream_foldl2_io_maybe_stop(
 	pred(int, bool, T, T, io, io),
 	T, io__maybe_partial_res(T), io, io).
@@ -722,6 +811,7 @@

 	% Applies the given closure to each byte read from the
 	% given binary input stream in turn, until eof or error.
+	%
 :- pred io__binary_input_stream_foldl(io__binary_input_stream,
 	pred(int, T, T), T, io__maybe_partial_res(T), io, io).
 :- mode io__binary_input_stream_foldl(in, in(pred(in, in, out) is det),
@@ -731,6 +821,7 @@

 	% Applies the given closure to each byte read from the
 	% given binary input stream in turn, until eof or error.
+	%
 :- pred io__binary_input_stream_foldl_io(io__binary_input_stream,
 	pred(int, io, io), io__res, io, io).
 :- mode io__binary_input_stream_foldl_io(in, in(pred(in, di, uo) is det),
@@ -740,6 +831,7 @@

 	% Applies the given closure to each byte read from the
 	% given binary input stream in turn, until eof or error.
+	%
 :- pred io__binary_input_stream_foldl2_io(io__binary_input_stream,
 	pred(int, T, T, io, io),
 	T, io__maybe_partial_res(T), io, io).
@@ -753,6 +845,7 @@
 	% Applies the given closure to each byte read from the
 	% given binary input stream in turn, until eof or error,
 	% or the closure returns `no' as its second argument.
+	%
 :- pred io__binary_input_stream_foldl2_io_maybe_stop(
 	io__binary_input_stream,
 	pred(int, bool, T, T, io, io),
@@ -772,6 +865,7 @@
 	% On some systems only one byte of pushback is guaranteed.
 	% `io__putback_byte' will throw an io__error exception
 	% if ungetc() fails.
+	%
 :- pred io__putback_byte(int::in, io::di, io::uo) is det.

 	% Un-reads a byte from specified binary input stream.
@@ -782,18 +876,22 @@
 	% On some systems only one byte of pushback is guaranteed.
 	% `io__putback_byte' will throw an io__error exception
 	% if ungetc() fails.
+	%
 :- pred io__putback_byte(io__binary_input_stream::in, int::in,
 	io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
+%
+% Binary output predicates.
+%

-	% Binary output predicates.
-	% These will all throw an io__error exception if an I/O error occurs.
-	% XXX what about wide characters?
+% These will all throw an io__error exception if an I/O error occurs.
+% XXX what about wide characters?

 	% Writes a binary representation of a term to the current
 	% binary output stream, in a format suitable for reading
 	% in again with io__read_binary.
+	%
 :- pred io__write_binary(T::in, io::di, io::uo) is det.

 	% Writes a binary representation of a term to the specified
@@ -802,103 +900,124 @@
 	%
 	% XXX Note that due to the current implementation,
 	% io__write_binary will not work for the Java back-end.
+	%
 :- pred io__write_binary(io__binary_output_stream::in, T::in, io::di, io::uo)
 	is det.

 	% Writes a single byte to the current binary output stream.
 	% The byte is taken from the bottom 8 bits of an int.
+	%
 :- pred io__write_byte(int::in, io::di, io::uo) is det.

 	% Writes a single byte to the specified binary output stream.
 	% The byte is taken from the bottom 8 bits of an int.
+	%
 :- pred io__write_byte(io__binary_output_stream::in, int::in, io::di, io::uo)
 	is det.

 	% Writes several bytes to the current binary output stream.
 	% The bytes are taken from a string.
+	%
 :- pred io__write_bytes(string::in, io::di, io::uo) is det.

 	% Writes several bytes to the specified binary output stream.
 	% The bytes are taken from a string.
+	%
 :- pred io__write_bytes(io__binary_output_stream::in, string::in,
 	io::di, io::uo) is det.

 	% Flush the output buffer of the current binary output stream.
+	%
 :- pred io__flush_binary_output(io::di, io::uo) is det.

 	% Flush the output buffer of the specified binary output stream.
+	%
 :- pred io__flush_binary_output(io__binary_output_stream::in,
 	io::di, io::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__seek_binary(io__binary_stream::in, io__whence::in, int::in,
 	io::di, io::uo) is det.

 	% Returns the offset (in bytes) into the specified binary stream.
+	%
 :- pred io__binary_stream_offset(io__binary_stream::in, int::out,
 	io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
-	% Binary input stream predicates.
+%
+% Binary input stream predicates.
+%

 	% Attempts to open a file for binary input, and if successful
 	% sets the current binary input stream to the newly opened stream.
 	% Result is either 'ok' or 'error'.
+	%
 :- pred io__see_binary(string::in, io__res::out, io::di, io::uo) is det.

 	% Closes the current input stream.
 	% The current input stream reverts to standard input.
 	% This will throw an io__error exception
 	% if an I/O error occurs.
+	%
 :- pred io__seen_binary(io::di, io::uo) is det.

 	% Attempts to open a binary file for input.
 	% Result is either 'ok(Stream)' or 'error(ErrorCode)'.
+	%
 :- pred io__open_binary_input(string::in,
 	io__res(io__binary_input_stream)::out, io::di, io::uo) is det.

 	% Closes an open binary input stream.
 	% This will throw an io__error exception
 	% if an I/O error occurs.
+	%
 :- pred io__close_binary_input(io__binary_input_stream::in,
 	io::di, io::uo) is det.

 	% Retrieves the current binary input stream.
 	% Does not modify the IO state.
+	%
 :- pred io__binary_input_stream(io__binary_input_stream::out,
 	io::di, io::uo) is det.

 	% io__set_binary_input_stream(NewStream, OldStream, !IO):
 	% Changes the current input stream to the stream specified.
 	% Returns the previous stream.
+	%
 :- pred io__set_binary_input_stream(io__binary_input_stream::in,
 	io__binary_input_stream::out, io::di, io::uo) is det.

 	% Retrieves the standard binary input stream.
 	% Does not modify the IO state.
+	%
 :- pred io__stdin_binary_stream(io__binary_input_stream::out,
 	io::di, io::uo) is det.

 	% Retrieves the human-readable name associated with the current binary
 	% input stream. For file streams, this is the filename.
+	%
 :- pred io__binary_input_stream_name(string::out, io::di, io::uo) is det.

 	% Retrieves the human-readable name associated with the specified
 	% binary input stream. For file streams, this is the filename.
+	%
 :- pred io__binary_input_stream_name(io__binary_input_stream::in, string::out,
 	io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
-	% Binary output stream predicates.
+%
+% Binary output stream predicates.
+%

 	% Attempts to open a file for binary output, and if successful
 	% sets the current binary output stream to the newly opened
 	% stream. As per Prolog tell/1. Result is either 'ok' or
 	% 'error(ErrCode)'.
+	%
 :- pred io__tell_binary(string::in, io__res::out, io::di, io::uo) is det.

 	% Closes the current binary output stream.
@@ -906,75 +1025,88 @@
 	% As per Prolog told/0.
 	% This will throw an io__error exception
 	% if an I/O error occurs.
+	%
 :- pred io__told_binary(io::di, io::uo) is det.

 	% Attempts to open a file for binary output.
 	% Result is either 'ok(Stream)' or 'error(ErrorCode)'.
+	%
 :- pred io__open_binary_output(string::in,
 	io__res(io__binary_output_stream)::out, io::di, io::uo) is det.

 	% Attempts to open a file for binary appending.
 	% Result is either 'ok(Stream)' or 'error(ErrorCode)'.
+	%
 :- pred io__open_binary_append(string::in,
 	io__res(io__binary_output_stream)::out, io::di, io::uo) is det.

 	% Closes an open binary output stream.
 	% This will throw an io__error exception
 	% if an I/O error occurs.
+	%
 :- pred io__close_binary_output(io__binary_output_stream::in,
 	io::di, io::uo) is det.

 	% Retrieves the current binary output stream.
 	% Does not modify the IO state.
+	%
 :- pred io__binary_output_stream(io__binary_output_stream::out,
 	io::di, io::uo) is det.

 	% Retrieves the standard binary output stream.
 	% Does not modify the IO state.
+	%
 :- pred io__stdout_binary_stream(io__binary_output_stream::out,
 	io::di, io::uo) is det.

 	% io__set_binary_output_stream(NewStream, OldStream, !IO):
 	% Changes the current binary output stream to the stream
 	% specified. Returns the previous stream.
+	%
 :- pred io__set_binary_output_stream(io__binary_output_stream::in,
 	io__binary_output_stream::out, io::di, io::uo) is det.

-%	Retrieves the human-readable name associated with the current
-%	binary output stream.
-%	For file streams, this is the filename.
+	% Retrieves the human-readable name associated with the current
+	% binary output stream.
+	% For file streams, this is the filename.
+	%
 :- pred io__binary_output_stream_name(string::out, io::di, io::uo) is det.

 	% Retrieves the human-readable name associated with the specified
 	% output stream. For file streams, this is the filename.
+	%
 :- pred io__binary_output_stream_name(io__binary_output_stream::in,
 	string::out, io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
-	% Global state predicates.
+%
+% Global state predicates.
+%

 	% io__progname(DefaultProgname, Progname):
 	% Returns the name that the program was invoked with, if available,
 	% or DefaultProgname if the name is not available.
 	% Does not modify the IO state.
+	%
 :- pred io__progname(string::in, string::out, io::di, io::uo) is det.

 	% io__progname_base(DefaultProgname, Progname):
 	% Like `io__progname', except that it strips off any path name
 	% preceding the program name.  Useful for error messages.
+	%
 :- pred io__progname_base(string::in, string::out, io::di, io::uo) is det.

 	% Returns the arguments that the program was invoked with,
 	% if available, otherwise an empty list.
 	% Does not modify the IO state.
+	%
 :- pred io__command_line_arguments(list(string)::out, io::di, io::uo) is det.

 	% 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::out, io::di, io::uo) is det.

 :- pred io__set_exit_status(int::in, io::di, io::uo) is det.
@@ -984,8 +1116,9 @@
 	% of type `univ' so that the application can store any data it wants
 	% there. The following predicates can be used to access this global
 	% state.
-
+	%
 	% Doesn't modify the io__state.
+	%
 :- pred io__get_globals(univ::uo, io::di, io::uo) is det.

 :- pred io__set_globals(univ::di, io::di, io::uo) is det.
@@ -993,11 +1126,12 @@
 	% The following predicates provide an interface to the environment
 	% list. Do not attempt to put spaces or '=' signs in the names of
 	% environment variables, or bad things may result!
-
+	%
 	% First argument is the name of the environment variable.
 	% Returns yes(Value) if the variable was set (Value will
 	% be set to the value of the variable) and no if the
 	% variable was not set.
+	%
 :- pred io__get_environment_var(string::in, maybe(string)::out,
 	io::di, io::uo) is det.

@@ -1005,11 +1139,13 @@
 	% second argument is the value to be assigned to that
 	% variable.  Will throw an exception if the system runs
 	% out of environment space.
+	%
 :- pred io__set_environment_var(string::in, string::in, io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
+%
 % File handling predicates
+%

 	% io__make_temp(Name, !IO) creates an empty file whose name
 	% is different to the name of any existing file. Name is bound
@@ -1030,6 +1166,7 @@
 	%    system property java.io.tmpdir. On UNIX systems the default
 	%    value of this property is typically "/tmp" or "/var/tmp";
 	%    on Microsoft Windows systems it is typically "c:\\temp".
+	%
 :- pred io__make_temp(string::out, io::di, io::uo) is det.

 	% io__mktemp(Dir, Prefix, Name, IO0, IO) creates an empty
@@ -1039,6 +1176,7 @@
 	% Name is bound to the name of the file.
 	% It is the responsibility of the program to delete the file
 	% when it is no longer needed.
+	%
 :- pred io__make_temp(string::in, string::in, string::out,
 	io::di, io::uo) is det.

@@ -1047,6 +1185,7 @@
 	% error/1 if it fails.
 	% If `FileName' names a file that is currently open,
 	% the behaviour is implementation-dependent.
+	%
 :- pred io__remove_file(string::in, io__res::out, io::di, io::uo) is det.

 	% io__rename_file(OldFileName, NewFileName, Result, !IO)
@@ -1058,16 +1197,19 @@
 	% the behaviour is also implementation-dependent;
 	% on some systems, the file previously named `NewFileName' will be
 	% deleted and replaced with the file previously named `OldFileName'.
+	%
 :- pred io__rename_file(string::in, string::in, io__res::out,
 	io::di, io::uo) is det.

 	% Can this platform read and create symbolic links.
+	%
 :- pred io__have_symlinks is semidet.

 	% io__make_symlink(FileName, LinkFileName, Result, !IO)
 	% attempts to make `LinkFileName' be a symbolic link to `FileName'.
 	% If `FileName' is a relative path, it is interpreted relative
 	% to the directory containing `LinkFileName'.
+	%
 :- pred io__make_symlink(string::in, string::in, io__res::out,
 	io::di, io::uo) is det.

@@ -1077,6 +1219,7 @@
 	% If `LinkTarget' is a relative path, it should be interpreted
 	% relative the directory containing `FileName', not the current
 	% directory.
+	%
 :- pred io__read_symlink(string::in, io__res(string)::out, io::di, io::uo)
 	is det.

@@ -1090,6 +1233,7 @@
 	% given in `AccessTypes' on `FileName'.
 	% XXX When using the .NET CLI, this predicate will sometimes
 	% report that a directory is writable when in fact it is not.
+	%
 :- pred io__check_file_accessibility(string::in, list(access_type)::in,
 	io__res::out, io::di, io::uo) is det.

@@ -1108,19 +1252,23 @@

 	% io__file_type(FollowSymLinks, FileName, TypeResult)
 	% finds the type of the given file.
+	%
 :- pred io__file_type(bool::in, string::in, io__res(file_type)::out,
 	io::di, io::uo) is det.

 	% io__file_modification_time(FileName, TimeResult)
 	% finds the last modification time of the given file.
+	%
 :- pred io__file_modification_time(string::in, io__res(time_t)::out,
 	io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
-	% Memory management predicates.
-
+%
+% Memory management predicates.
+%
+
 	% Write memory/time usage statistics to stderr.
+	%
 :- pred io__report_stats(io::di, io::uo) is det.

 	% Write statistics to stderr; what statistics will be written
@@ -1141,11 +1289,13 @@
 	%			of the tabling system. Requires the runtime
 	%			to have been compiled with the macro
 	%			MR_TABLE_STATISTICS defined.
+	%
 :- pred io__report_stats(string::in, io::di, io::uo) is det.

 %-----------------------------------------------------------------------------%
-
-	% Miscellaneous predicates
+%
+% Miscellaneous predicates
+%

 	% Invokes the operating system shell with the specified
 	% Command.  Result is either `ok(ExitStatus)', if it was
@@ -1154,6 +1304,7 @@
 	% successfully or the return value of the system call.  If a
 	% signal kills the system call, then Result will be an error
 	% indicating which signal occurred.
+	%
 :- pred io__call_system(string::in, io__res(int)::out, io::di, io::uo) is det.

 :- type io__system_result
@@ -1167,22 +1318,26 @@
 	% `error(ErrorCode)' if the command could not be executed.
 	% The `ExitStatus' will be 0 if the command completed
 	% successfully or the return value of the command otherwise.
+	%
 :- pred io__call_system_return_signal(string::in,
 	io__res(io__system_result)::out, io::di, io::uo) is det.

 	% Construct an error code including the specified error message.
+	%
 :- func io__make_io_error(string) = io__error.

 	% Look up the error message corresponding to a particular error code.
+	%
 :- func io__error_message(io__error) = string.
 :- pred io__error_message(io__error::in, string::out) is det.

 %-----------------------------------------------------------------------------%
+%
+% Deprecated predicates.
+%

-	% Deprecated predicates.
-	%
-	% Do not use these in new programs!
-	% They may be deleted in the next release.
+% Do not use these in new programs!
+% They may be deleted in the next release.

 	% use io__input_stream/3 instead -- it has identical semantics
 :- pragma obsolete(io__current_input_stream/3).

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