[m-rev.] diff: enum.m doc update

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Sep 5 16:21:28 AEST 2005


library/enum.m:
	Clarify the documentation a bit, and convert to four-space indentation.

Zoltan.

cvs diff: Diffing library
Index: library/enum.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/enum.m,v
retrieving revision 1.2
diff -u -b -r1.2 enum.m
--- library/enum.m	11 Feb 2001 11:45:13 -0000	1.2
+++ library/enum.m	2 Sep 2005 01:06:24 -0000
@@ -1,19 +1,17 @@
 %-----------------------------------------------------------------------------%
+% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
+%-----------------------------------------------------------------------------%
 % Copyright (C) 2000 The University of Melbourne.
 % This file may only be copied under the terms of the GNU Library General
 % Public License - see the file COPYING.LIB in the Mercury distribution.
 %-----------------------------------------------------------------------------%
+%
 % File: enum.m.
 % Author: stayl.
-% Stability: very low.
-%
-% This module provides the typeclass `enum', which describes
-% types which can be converted to and from integers without loss
-% of information.
+% Stability: medium
 %
-% The interface of this module is likely to change.
-% At the moment it is probably best to only use the `enum'
-% type class for types to be stored in `sparse_bitset's.
+% This module provides the typeclass `enum', which describes types
+% which can be converted to and from integers without loss of information.
 %
 %-----------------------------------------------------------------------------%
 
@@ -22,7 +20,8 @@
 :- interface.
 
 	% For all instances the following must hold:
-	%	all [X, Int] (X = from_int(to_int(X)))
+	%	all [X] (X = from_int(to_int(X)))
+	%	all [Int] (some [Y] Int = to_int(Y) => from_int(Int) = Y)
 :- typeclass enum(T) where [
 	func to_int(T) = int,
 	func from_int(int) = T is semidet
--------------------------------------------------------------------------
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