[m-dev.] for review: fix existential types bug

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 25 16:10:34 AEST 1999


On 25-Oct-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>  
> > > > > Shouldn't that last occurrence of `GoalInfo0' be `GoalInfo'?
> > > > 
> > > > No, because the extra type-infos are local to that conjunction.
> > > 
> > > Are you sure?
> >  
> > > After polymorphism this will be
> > > 
> > > 	p(Flag, U) -->
> > > 		(if { Flag = yes, U = foo(TypeInfo, X) } then
> > > 			io__print(TypeInfo, X)
> > > 		else
> > > 			[]
> > > 		).
> > > 
> > > and the scope of TypeInfo is not local to the conjunction.
> >  
> > Ok, I'll fix that.
> 
> Actually, no I won't. For that case there is a polymorphically typed
> variable (X), so the quantification pass will by run by
> polymorphism__fixup_quantification. The problem I fixed occurs for
> existentially typed _constructions_. If the types are ground, the
> type-infos are local to the conjunction. If the types are non-ground,
> polymorphism__fixup_quantification will requantify the goal.
> The case above is a deconstruction, which will always introduce a new
> type variable, and quantification will be run.

OK, that is fine.
But it might be a good idea to add a comment.

-- 
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.
--------------------------------------------------------------------------
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