Possible bug?

Simon Peyton-Jones simonpj@microsoft.com
Thu, 3 May 2001 01:42:08 -0700


This looks ok to me.  The two instances do not unify, because
	(c1 a1) does not unify with (c2 a2, c2 b2)

GHC is happy with it.

Simon

| -----Original Message-----
| From: Jonathon Bell [mailto:jbell@mathsoft.com]=20
| Sent: 16 April 2001 22:43
| To: 'hugs-bugs@haskell.org'
| Subject: Possible bug?
|=20
|=20
| Hi chaps,
|=20
| Hugs (Feb 2001) fails to compile the following, complaining=20
| that the instances are not consistent with the dependencies:
|=20
|    class Foo f a r | f a->r where
|=20
|       foo::f->a->r
|=20
|    instance Foo (a->r)     (c a)    (c r)
|=20
|    instance Foo ((a,b)->r) (c a,c b)(c r)
|=20
|=20
| My intention is to overload the uncurried function foo for=20
| based on both its arity and the kind of tuple it is passed.=20
| Could you please explain what i am doing wrong here?
|=20
| Thank you so much,
|=20
| _______________________________
| Jonathon Bell jbell@mathsoft.com
| MathSoft, Inc.  www.mathsoft.com
| 101 Main St, Cambridge, MA 02142
| (617) 577-1017 x745
|=20
|=20
| _______________________________________________
| Hugs-Bugs mailing list
| Hugs-Bugs@haskell.org=20
| http://www.haskell.org/mailman/listinfo/hugs-bugs
|=20