[m-rev.] diff: fix too lax det warning in det_arg

Peter Ross pro at missioncriticalit.com
Tue Dec 3 20:56:39 AEDT 2002


fjh wrote:
> On 02-Dec-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> > library/deconstruct.m:
> >     Fix a too lax determinism warning in det_arg.
> >
> > Index: library/deconstruct.m
> > ===================================================================
> > RCS file: /home/staff/zs/imp/mercury/library/deconstruct.m,v
> > retrieving revision 1.16
> > diff -u -r1.16 deconstruct.m
> > --- library/deconstruct.m 2 Dec 2002 12:16:04 -0000 1.16
> > +++ library/deconstruct.m 2 Dec 2002 12:50:10 -0000
> > @@ -150,7 +150,7 @@
> >  :- mode det_arg(in, in(do_not_allow), in, out) is det.
> >  :- mode det_arg(in, in(canonicalize), in, out) is det.
> >  :- mode det_arg(in, in(include_details_cc), in, out) is cc_multi.
> > -:- mode det_arg(in, in, in, out) is cc_multi.
> > +:- mode det_arg(in, in, in, out) is det.
>
> That doesn't make any sense.  Why is the third mode cc_multi, but the
> fourth mode det?  The fourth mode is a superset of the third mode, so
> its determinism should not be tighter than the determinism of the
> third mode.
>
The problem is that the inferred mode for the third argument is erroneous,
but the library is compiled with --no-warn-inferred-erroneous.  Therefore we
only get the warning for fourth mode.

However the real cause of this problem is that det_arg needs to be rewritten
to call arg_cc for the include_details_cc case.  I will do this later today.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002

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