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

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Oct 15 18:06:55 AEST 1998


On 14-Oct-1998, David Glen JEFFERY <dgj at cs.mu.OZ.AU> wrote:
> Fix two bugs in polymorphism.m (one of which didn't show up until the other
> was fixed). The test case for this fix is 
> tests/hard_coded/typeclasses/existential_type_class.m.
> 
> compiler/polymorphism.m:
> 	Don't map__det_insert existential typeclass_infos into the type class
> 	info map as they may already be there. (eg. when it is in two 
> 	variables which get unified).
> 
> 	Only add instmap_deltas for type info variables if the type info
> 	has its own variable. ie. it isn't inside a typeclass info.

That looks fine.  I'm not sure that the first fix (replacing
map__det_insert with map__set) is the most elegant one possible, but
fixing it in an elegant manner would be a lot of work, I think, so
please commit it as is.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list