[m-rev.] for review: fix singleton variable warning problem

Fergus Henderson fjh at cs.mu.OZ.AU
Fri May 31 21:22:37 AEST 2002


On 31-May-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> This is still treating the symptom, not the cause. Why do variables
> in foreign_proc clauses need to be handled differently? Why doesn't
> this problem occur with Mercury clauses?

The problem doesn't occur with Mercury clauses because after flattening
(conversion to SHF), the head variables in Mercury clauses are never
singletons; the head variables are always "HeadVar__N", which might
get unified with singleton variables in the body, but which are not
themselves singletons.

For foreign_proc clauses, we don't use "HeadVar__N" as the head variables;
instead, we use the variables that the user specified directly.

One possible solution, then, might be to change the way we handle
foreign_proc clauses, so that we do introduce "HeadVar__N" variables
and the corresponding unifications for those.  I don't know if that
would be a good idea, or if it might result in other problems...

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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