[m-dev.] for review: fix existential types bug
Simon Taylor
stayl at cs.mu.OZ.AU
Mon Oct 25 14:31:52 AEST 1999
>
> On 25-Oct-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> >
> > compiler/polymorphism.m:
> > Add the type-info variables added for the existential
> > type variables of a constructor to the non-locals of
> > the construction.
>
> Hmm... why doesn't the call to implicitly_quantify_goal
> in polymorphism__fixup_quantification fix that?
> (polymorphism__fixup_quantification is called from
> polymorphism__process_clause.)
implicitly_quantify_goal is only called from
polymorphism__fixup_quantification if the predicate being
processed has type variables in the argument types.
This does not check whether called predicates, functions
or constructors have type variables in their argument types.
> > + goal_info_get_nonlocals(GoalInfo0, NonLocals0),
> > + set__insert_list(NonLocals0, ExtraVars, NonLocals),
> > + goal_info_set_nonlocals(GoalInfo0, NonLocals, GoalInfo),
> > Unify = unify(X0, functor(ConsId, ArgVars), Mode0,
> > - Unification0, UnifyContext) - GoalInfo0,
> > + Unification0, UnifyContext) - GoalInfo,
> > list__append(ExtraGoals, [Unify], GoalList),
> > conj_list_to_goal(GoalList, GoalInfo0, Goal)
>
> Shouldn't that last occurrence of `GoalInfo0' be `GoalInfo'?
No, because the extra type-infos are local to that conjunction.
Simon.
--------------------------------------------------------------------------
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