[m-rev.] for review: fix bug reported by Peter Ross

Mark Brown mark at cs.mu.OZ.AU
Thu Jun 8 15:11:13 AEST 2006


On 01-Jun-2006, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> 
> On Thu, 1 Jun 2006, Mark Brown wrote:
> 
> > Index: tests/hard_coded/typeclasses/fundeps_5.m
> > ===================================================================
> > RCS file: tests/hard_coded/typeclasses/fundeps_5.m
> > diff -N tests/hard_coded/typeclasses/fundeps_5.m
> > --- /dev/null	1 Jan 1970 00:00:00 -0000
> > +++ tests/hard_coded/typeclasses/fundeps_5.m	31 May 2006 12:48:47 -0000
> > @@ -0,0 +1,56 @@
> > +/*
> > +Uncomment one line in do_something and this program compiles,
> > +or remove the typevariable X from the typeclass definitions and
> > +the program compiles.  Note this comes from a test case where
> > +there are methods which use X in typeclass definitions.
> > +*/
> > +
> 
> It would be nice to have a short description of what the problem was

Done.

> and also which rotd was affected by the bug.

I haven't bothered to look this up.  Like most test cases, all rotds prior
to this test case being committed were affected (well, all rotds since we
added functional dependencies, anyway).

Cheers,
Mark.

Estimated hours taken: 0.25
Branches: main, release

tests/hard_coded/typeclasses/fundeps_5.m:
	Add some explanation of what the problem was that caused this test
	case to fail.

Index: tests/hard_coded/typeclasses/fundeps_5.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/fundeps_5.m,v
retrieving revision 1.1
diff -u -r1.1 fundeps_5.m
--- tests/hard_coded/typeclasses/fundeps_5.m	31 May 2006 16:00:40 -0000	1.1
+++ tests/hard_coded/typeclasses/fundeps_5.m	8 Jun 2006 05:05:25 -0000
@@ -1,8 +1,16 @@
 /*
-Uncomment one line in do_something and this program compiles,
-or remove the typevariable X from the typeclass definitions and
-the program compiles.  Note this comes from a test case where
-there are methods which use X in typeclass definitions.
+From the original bug report:
+
+	Uncomment one line in do_something and this program compiles,
+	or remove the typevariable X from the typeclass definitions and
+	the program compiles.  Note this comes from a test case where
+	there are methods which use X in typeclass definitions.
+
+The problem was that the ancestors of assumed constraints (in this case,
+the constraint a(B, X) where B is the type of B1) were not being used
+when searching for opportunities for improvement.  As a result, the
+unproven constraint a(B, Y) on the call to hello/1 could not be satisfied,
+since the improvement X = Y wasn't discovered.
 */
 
 :- module fundeps_5.
--------------------------------------------------------------------------
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