[m-rev.] diff: document library/bool.m

Mark Brown mark at csse.unimelb.edu.au
Thu Nov 29 16:01:54 AEDT 2007


Estimated hours taken: 0.25
Branches: main

library/bool.m:
	Document the exported predicates and functions.

Index: bool.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/bool.m,v
retrieving revision 1.19
diff -u -r1.19 bool.m
--- bool.m	6 Mar 2007 05:48:33 -0000	1.19
+++ bool.m	29 Nov 2007 04:59:09 -0000
@@ -33,21 +33,35 @@
 
 :- instance enum(bool).
 
+    % or(A, B) = yes iff A = yes, or B = yes, or both.
+    %
 :- func bool.or(bool, bool) = bool.
 :- pred bool.or(bool::in, bool::in, bool::out) is det.
 
+    % or_list(As) = yes iff there exists an element of As equal to yes.
+    % (Note that or_list([]) = no.)
+    %
 :- func bool.or_list(list(bool)) = bool.
 :- pred bool.or_list(list(bool)::in, bool::out) is det.
 
+    % and(A, B) = yes iff A = yes and B = yes.
+    %
 :- func bool.and(bool, bool) = bool.
 :- pred bool.and(bool::in, bool::in, bool::out) is det.
 
+    % and_list(As) = yes iff every element of As is equal to yes.
+    % (Note that and_list([]) = yes.)
+    %
 :- func bool.and_list(list(bool)) = bool.
 :- pred bool.and_list(list(bool)::in, bool::out) is det.
 
+    % not(A) = yes iff A = no.
+    %
 :- func bool.not(bool) = bool.
 :- pred bool.not(bool::in, bool::out) is det.
 
+    % xor(A, B) = yes iff A = yes, or B = yes, but not both.
+    %
 :- func bool.xor(bool, bool) = bool.
 
     % pred_to_bool(P) = (if P then yes else no).
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list