[m-rev.] for review: extras/quickcheck changes

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Mar 18 16:06:09 AEDT 2002


On 18-Mar-2002, Peter Moulder <pmoulder at csse.monash.edu.au> wrote:
> Index: rnd.m
...
> @@ -42,15 +59,21 @@
>  :- mode shuffle(in, out, in, out) is det.
>  
>  	% get a random element of a list.
> +	% Requires that the list of options be non-empty.
>  :- pred oneof(list(T), T, rnd, rnd).
>  :- mode oneof(in, out, in, out) is det.

You might want to consider having this condition checked
by the mode system:

	:- mode oneof(in(non_empty_list), out, in, out) is det.

Otherwise that change looks fine.

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