[m-rev.] diff: common.m improvement

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Apr 21 09:56:31 AEST 2005


On 20-Apr-2005, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> I think it might be better to have something like this:
> 
> 	common__types_match_exactly(Type1, Type2) :-
> 		(
> 		    Type1 = Type2
> 		;
> 		    % check if the types are the same when you
> 		    % ignore the term.context fields
> 
> 		    % XXX should succeed for embedded constraints
> 		    type_to_ctor_and_args(Type1, TypeCtor1, Args1),
> 		    type_to_ctor_and_args(Type2, TypeCtor2, Args2),
> 		    TypeCtor1 = TypeCtor2,
> 		    common__types_match_exactly_list(Args1, Args2)
> 		).

That's what I had originally, but then I had a bootcheck succeed after
I modified common.m to abort if the first test failed the second succeeded.
In other words, the second disjunct isn't adding anything; that's why
I deleted it.

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