[m-rev.] for review: constrained polymorphic insts
    Fergus Henderson 
    fjh at cs.mu.OZ.AU
       
    Wed Mar 13 23:00:44 AEDT 2002
    
    
  
On 07-Mar-2002, David Overton <dmo at cs.mu.OZ.AU> wrote:
> +inst_matches_initial_4(ground(UniqA, _GII_A), bound(UniqB, ListB), MaybeType,
>  		Info0, Info) :-
>  	MaybeType = yes(Type),
>  		% We can only check this case properly if the type is known.
> -	GII_A \= constrained_inst_var(_),
> -		% Don't overly constrain the inst_var.
Hmm, why did that test get removed?
(The code is probably right, but please double-check it.)
> @@ -838,6 +884,16 @@
>  		% XXX how do we get the argument types for an abstract inst?
>  	inst_list_matches_final(ArgsA, ArgsB, MaybeTypes, Info0, Info).
>  inst_matches_final_3(not_reached, _, _, I, I).
> +inst_matches_final_3(constrained_inst_vars(InstVarA, InstA), InstB, MaybeType,
> +		Info0, Info) :-
> +	( InstB = constrained_inst_vars(InstVarB, InstB1) ->
> +		% Constrained_inst_vars match_final only if they are the same
> +		% variable.
> +		InstVarA = InstVarB,
s/InstVarA/InstVarsA/ and 
s/InstVarB/InstVarsB/
Shouldn't this code be checking whether the two sets have any members
in common (a non-empty intersection), rather than checking if they are
equal?
Apart from that, this change looks fine now.
-- 
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