[m-rev.] for review: functional dependencies (3/3)

Mark Brown mark at cs.mu.OZ.AU
Thu Apr 21 13:36:18 AEST 2005


On 21-Apr-2005, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Mark Brown, Wednesday, 20 April 2005:
> > Index: doc/reference_manual.texi
> > ===================================================================
> > +the type variables appearing in the type signature of the method.
> > +A variable is determined by a type signature if it appears in the
> > +type signature, but if functional dependencies are present
> > +then it may also be determined from other variables
> > +(@pxref{Functional dependencies}).
> 
> I think s/from other variables/from the other variables/ is better.

Done.

> 
> > + at node Functional dependencies
> > + at section Functional dependencies
> > +
> > +Type classes may be defined to have functional dependencies between arguments.
> > +There may be any number of functional dependencies on one typeclass.
> > +Each constraint is expressed with the same syntax as typeclass constraints
> > +on typeclass declarations, using a special constraint of the form
> > + at code{(@var{Domain} -> @var{Range})}.
> 
> I think this paragraph could be more clearly expressed as
> 
> 	Type class constraints may include any number of functional
> 	dependencies.  A functional dependency constraint takes the
> 	form @code{(@var{Domain} -> @var{Range})}.
> 

Done.  I've also merged that paragraph with the one following, since that
seems to make more sense now.

> Otherwise that all looks great.
> 

Estimated hours taken: 0.1
Branches: main

doc/reference_manual.texi:
	Address Ralph's comments on the functional dependencies change.

Index: doc/reference_manual.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/reference_manual.texi,v
retrieving revision 1.314
diff -u -r1.314 reference_manual.texi
--- doc/reference_manual.texi	21 Apr 2005 01:22:55 -0000	1.314
+++ doc/reference_manual.texi	21 Apr 2005 02:51:47 -0000
@@ -4563,7 +4563,7 @@
 the type variables appearing in the type signature of the method.
 A variable is determined by a type signature if it appears in the
 type signature, but if functional dependencies are present
-then it may also be determined from other variables
+then it may also be determined from the other variables
 (@pxref{Functional dependencies}).
 
 For example,
@@ -5021,12 +5021,9 @@
 @node Functional dependencies
 @section Functional dependencies
 
-Type classes may be defined to have functional dependencies between arguments.
-There may be any number of functional dependencies on one typeclass.
-Each constraint is expressed with the same syntax as typeclass constraints
-on typeclass declarations, using a special constraint of the form
+Type class constraints may include any number of functional dependencies.
+A functional dependency constraint takes the form
 @code{(@var{Domain} -> @var{Range})}.
-
 The @var{Domain} and @var{Range} arguments are either single type variables,
 or conjunctions of type variables separated by commas.
 
--------------------------------------------------------------------------
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