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

Simon Taylor stayl at cs.mu.OZ.AU
Mon Oct 25 15:44:09 AEST 1999


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

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