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

_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to