[m-dev.] for review: fix polymorphism bug

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 12 15:59:00 AEDT 2001


On 08-Feb-2001, David Glen JEFFERY <dgj at cs.mu.OZ.AU> wrote:
> Fix a bug reported by petdr on October 30th last year.
>   
> compiler/polymorphism.m:
>         When looking up the variable which contains a typeclass info for
>         a particular constraint to be passed to a call, handle the case where
>         there is *no* variable for such a constraint. This occurs in the case
>         where the producer of the variable occurs later on in the goal (but
>         will get re-ordered by the mode checker). The solution is to just
>         create a variable for the typeclass info, and whenever creating
>         a `head' variable to hold a constraint being produced by a call, 
>         check first whether there is already a variable allocated for that
>         constraint.
> 
> doc/reference_manual.texi:
> 	Delete mention of this bug from the "Known Bugs"  in the existential
> 	types section.
>   
> tests/hard_coded/typeclasses/Mmakefile:
> tests/hard_coded/typeclasses/reordered_existential_constraint.exp:
> tests/hard_coded/typeclasses/reordered_existential_constraint.m:
>         A test case for this. (Not the same as petdr's original test case,
>         but much simpler and exhibits the same bug).

That looks fine, thanks!

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list