[m-rev.] for review: arrays and the debugger

Mark Brown dougl at cs.mu.OZ.AU
Tue Jun 19 17:40:44 AEST 2001


On 19-Jun-2001, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> > Index: library/std_util.m
> > ===================================================================
> > RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
> > retrieving revision 1.232
> > diff -u -b -r1.232 std_util.m
> > --- library/std_util.m	2001/06/04 13:39:15	1.232
> > +++ library/std_util.m	2001/06/12 16:44:41
> > @@ -566,6 +566,13 @@
> >  	%
> >  :- pred deconstruct(T::in, string::out, int::out, list(univ)::out) is det.
> >  
> > +	% limited_deconstruct(Data, MaxArity, Functor, Arity, Arguments)
> > +	%
> > +	% limited_deconstruct works like deconstruct, but if the arity of T is
> > +	% greater than MaxArity, limited_deconstruct fails.
> > +:- pred limited_deconstruct(T::in, int::in, string::out,
> > +	int::out, list(univ)::out) is semidet.
> > +
> 
> For consistency, there should be an extra blank comment line before the
> pred declaration.

I forgot to mention two points here:

	- You should give the motivation for the existence of
	  limited_deconstruct, namely that deconstruct alone can be very
	  costly for arrays.

	- You should explicitly document that the arity of an array is
	  its length.

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