[m-rev.] diff: handle user defined equality in rtti_implementation__deconstruct
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Nov 30 03:59:24 AEDT 2002
On 29-Nov-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> +handle_usereq_type(Term, TypeInfo, TypeCtorInfo,
> + TypeCtorRep, NonCanon, Functor, Arity, Arguments) :-
> + ( NonCanon = do_not_allow,
> + error("attempt to deconstruct noncanonical term")
> + ; NonCanon = canonicalize,
> + Functor = expand_type_name(TypeCtorInfo, yes),
> + Arity = 0,
> + Arguments = []
The two lines above look wrong -- there should at least be an XXX comment
there.
> + ; NonCanon = include_details_cc,
> + deconstruct(Term, TypeInfo, TypeCtorInfo, TypeCtorRep,
> + NonCanon, Functor, Arity, Arguments)
Isn't that going to result in an infinite loop, handle_usereq_type/7 calls
deconstruct/7 calls handle_usereq_type/7 calls deconstruct/7 ...?
Otherwise this one looks fine. Thanks for breaking it into small diffs.
--
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