[m-rev.] diff: small change to coding standard

Julien Fischer juliensf at cs.mu.OZ.AU
Mon Oct 11 19:26:41 AEST 2004


Are there any objections to make the following change to
the coding standard regarding standard library predicates?

Estimated hours taken: 0.1
Branches: main

compiler/notes/coding_standards.html:
	If a grouping of predicate, mode and function declarations
	occurs in the interface one of the standard library modules
	specify that the function declaration should listed before the
	others.  The rationale for doing this is to make the library
	reference manual more consistent (it also makes it easier
	to see if there is a function version of a predicate.

Julien.

Index: coding_standards.html
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/notes/coding_standards.html,v
retrieving revision 1.13
diff -u -r1.13 coding_standards.html
--- coding_standards.html	5 Apr 2004 13:45:51 -0000	1.13
+++ coding_standards.html	11 Oct 2004 08:55:38 -0000
@@ -384,17 +384,19 @@
 </pre>

 A group of related predicate, mode and function declarations may be grouped
-together under a single description provided that it is formatted as above.
+together under a single description provided that it is formatted as above.
+If there is a function declaration in such a grouping then it should be listed
+before the others.

-For example
+For example:

 <pre>

 		% Insert a new key and corresponding value into a map.
 		% Fail if the key already exists.
 		%
-	:- pred map.insert(map(K, V)::in, K::in, V::in, map(K, V)::out) is det.
 	:- func map.insert(map(K, V), K, V) = map(K, V).
+	:- pred map.insert(map(K, V)::in, K::in, V::in, map(K, V)::out) is det.

 </pre>

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