Re: GHC, functional dependency, rank-2 type

2004-01-13 Thread oleg
John Tromp wrote: > >>instance (Bar a) => Foo a > I have tried to write code myself like in the last line, > stating that any instance of one class should also be > an instance of another class. But Hugs would complain about > it. You're right. Hugs needs to be told that the code is in an extend

Re: GHC, functional dependency, rank-2 type

2004-01-13 Thread John Tromp
[EMAIL PROTECTED] wrote: There appears to be a problem with GHC's handling of multi-parameter constraints with functional dependencies in the context of rank-2 types. The problem is not present in Hugs. Let us first consider a simple example: module Test where class Foo a class Bar a data Obj =

RE: GHC, functional dependency, rank-2 type

2004-01-13 Thread Simon Peyton-Jones
That is indeed bizarre. I'll look into it. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | [EMAIL PROTECTED] | Sent: 13 January 2004 05:51 | To: [EMAIL PROTECTED] | Subject: GHC, functional dependency, rank-2 type | | | There appears

GHC, functional dependency, rank-2 type

2004-01-12 Thread oleg
There appears to be a problem with GHC's handling of multi-parameter constraints with functional dependencies in the context of rank-2 types. The problem is not present in Hugs. Let us first consider a simple example: > module Test where > class Foo a > > class Bar a > > data Obj = Obj > > insta