[m-dev.] for review: counter.m

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Mar 9 18:44:16 AEDT 2000


On 09-Mar-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> library/counter.m:
> 	New module to managing integer counters.
> 
> library/library.m:
> 	Include the new module in the library.

That looks good.  You should mention this in the NEWS file.

> +	% counter_init(N, Counter) returns a counter whose first allocation
> +	% will be the integer N.
> +:- pred counter__init(int::in, counter::out) is det.

It would probably be better to make that a function rather than
a predicate.  Or alternatively, if you want consistency with the
rest of the library, you could define both.

It would also be nice to modify term__var_supply,
graph__arc_supply, and graph__node_supply to use the counter type.

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