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

Mark Brown dougl at cs.mu.OZ.AU
Thu Oct 31 18:52:25 AEDT 2002


On 28-Oct-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Branches: main Estimated hours taken: 0.5

Formatting error.

> 
> doc/reference_manual.texi:
> 	Document the scoping rules for inst variables.
> 
> Workspace: /home/ceres/fjh/ws-ceres2/mercury
> Index: doc/reference_manual.texi
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/doc/reference_manual.texi,v
> retrieving revision 1.259
> diff -u -d -r1.259 reference_manual.texi
> --- doc/reference_manual.texi	1 Oct 2002 08:13:26 -0000	1.259
> +++ doc/reference_manual.texi	28 Oct 2002 10:17:14 -0000
> @@ -1442,16 +1442,28 @@
>  @node Variable scoping
>  @section Variable scoping
>  
> -Variables occurring in data-terms, other than in the right-hand
> -(@var{Type}) operand of an explicit type qualification,
> -are called ordinary variables,
> -while variables occurring in types are called type variables.
> -Type variables and ordinary variables occupy different namespaces:
> -there is no semantic relationship between a type variable and
> -an ordinary variable even if they happen to share the same name.
> +There are sorts of variables in Mercury: ordinary variables,

s/sorts/three sorts/

> +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).  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 three different variables sorts occupy different namespaces:

s/variables/variable/

Other than that, the change is fine.

Cheers,
Mark.

--------------------------------------------------------------------------
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