[m-rev.] for review: document inst var scoping

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Oct 31 19:15:06 AEDT 2002


On 31-Oct-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> On 28-Oct-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > 
> > +type variables, and inst variables.
> > +
> > +Variables occurring in types are called type variables.
> > +Variables occurring in insts or modes are called inst variables.
> > +Variables that occur in data-terms,
> > +and that are not inst variables
> > +or type variables, are called ordinary variables.
> > +
> > +(Type variables can occur in data-terms in the right-hand [@var{Type}]
> > +operand of an explicit type qualification.
> > +Inst variables can occur in data-terms in the right-hand [@var{Mode}]
> > +operand of an explicit mode qualification.  Apart from that,
> > +all other variables in data-terms are ordinary variables.)
> 
> This is part of the definitions, so it shouldn't be parenthesized (that
> is, it couldn't be omitted without changing the meaning).

No, the meaning is the same if the bit in parentheses is omitted.
The bit in parentheses is additional explanation, not part of the
definition.

> I'd write the
> definitions this way:
> 
> Variables occurring in types or in the right-hand [@var{Type}] operand
> of an explicit type qualification are called type variables.
> Variables occurring in insts, modes or in the right-hand [@var{Mode}]
> operand of an explicit mode qualification are called inst variables.
> 
> ... and leave the third part of the definition unchanged.

The right-hand operand of an explicit type qualification *is* a type.
(This is specified in the description of explicit type qualifications.)
That's why it's enough to say that "variables occurring in types
are called type variables".


Thanks for the review.
I've applied all your other suggestions.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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