[m-rev.] for review: fix existential typeclass reordering bug
Simon Taylor
stayl at cs.mu.OZ.AU
Wed Jun 12 02:24:30 AEST 2002
On 12-Jun-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 12-Jun-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> >
> > + %
> > + % For code which requires mode reordering, we may have
> > + % already seen some of the type-infos produced by this
> > + % call. The type-info locations for those variables will
> > + % be a type-info
> > + %
> > + list__foldl2(polymorphism__maybe_extract_type_info(OldTypeInfoMap),
> > + TVars, [], ExtraGoals, PolyInfo2, PolyInfo).
>
> That comment looks incomplete.
--- polymorphism.m 2002/06/11 16:11:27 1.2
+++ polymorphism.m 2002/06/11 16:22:29
@@ -2624,16 +2624,15 @@
constraint_list_get_tvars(ExistentialConstraints, TVars0),
list__sort_and_remove_dups(TVars0, TVars),
-
- %
- % For code which requires mode reordering, we may have
- % already seen some of the type-infos produced by this
- % call. The type-info locations for those variables will
- % be a type-info
- %
list__foldl2(polymorphism__maybe_extract_type_info(OldTypeInfoMap),
TVars, [], ExtraGoals, PolyInfo2, PolyInfo).
+ % For code which requires mode reordering, we may have already
+ % seen uses of some of the type variables produced by this call.
+ % At the point of the use of a type variable that we haven't seen
+ % before, we assume that it is unconstrained. If it turns out that
+ % the type variable is constrained, and the type_info is contained
+ % in a typeclass_info, we need to generate code to extract it here.
:- pred polymorphism__maybe_extract_type_info(type_info_varmap,
tvar, list(hlds_goal), list(hlds_goal),
poly_info, poly_info).
--------------------------------------------------------------------------
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