[m-dev.] for review: fix doc for class constraint ordering

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Oct 3 03:32:48 AEST 1999


For review by dgj and/or zs.

----------

Estimated hours taken: 1

doc/reference_manual.texi:
	Change the documentation of existential types to say that
	existential constraints must precede universal constraints
	rather than vice versa.

	This change makes the documentation consistent with the
	behaviour of the compiler.

	The rationale for changing the documentation rather than
	changing the compiler is that the order that the compiler
	uses more closely matches the logic of the type declaration.

Workspace: /home/mercury0/fjh/mercury
cvs diff  doc/reference_manual.texi
Index: doc/reference_manual.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/reference_manual.texi,v
retrieving revision 1.152
diff -u -r1.152 reference_manual.texi
--- reference_manual.texi	1999/09/12 04:27:25	1.152
+++ reference_manual.texi	1999/10/02 17:20:08
@@ -3554,14 +3554,14 @@
 as universal constraints, but using "=>" instead of "<=";
 they signify a constraint that the @emph{callee} must satisfy.
 (If a declaration has both universal and existential constraints,
-then the universal constraints must precede the existential constraints.)
+then the existential constraints must precede the universal constraints.)
 
 For example:
 
 @example
-% Here `c1(T1)' is a universal constraint,
-% and `c2(T2)' is an existential constraint.
-:- all [T1] some [T2] ((pred p(T1, T2) <= c1(T1)) => (c2(T2), c3(T1, T2)).
+% Here `c1(T2)' and `c2(T1, T2)' are existential constraints,
+% and `c3(T1)' is a universal constraint,
+:- all [T1] some [T2] ((pred p(T1, T2) => (c1(T2), c2(T1, T2))) <= c3(T1)).
 @end example
 
 In general, constraints that constrain any existentially quantified

-- 
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list