type class problem / GHC bug

Simon Peyton-Jones simonpj at microsoft.com
Mon Nov 10 06:00:07 EST 2003


A bug thank you; now fixed.

Please send bug reports about GHC to glasgow-haskell-bugs at haskell.org,
not to the Haskell mailing list.

Simon

| -----Original Message-----
| From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org]
On Behalf Of Brandon
| Michael Moore
| Sent: 08 November 2003 13:20
| To: haskell at haskell.org
| Subject: type class problem / GHC bug
| 
| Hi everyone
| 
| I've built GHC from CVS and I'm getting some odd errors about
overlapping
| instances. This is different from 6.0.1, but it's not obvious it is
wrong,
| so I'm probably missing something here.
| 
| The example is
| 
| class A x
| class (A x) => B x
| instance A x
| instance B x
| 
| The new GHC complains that the second instance overlapps with the
first.
| Maybe because of the context on B x the instance for B x is
interpreted as
| a claim we have A x too, but shouldn't it be the other way, that you
need
| an instance A x from somewhere along with an instance for B x?
| 
| Thanks
| 
| Brandon
| 
| _______________________________________________
| Haskell mailing list
| Haskell at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell




More information about the Glasgow-haskell-bugs mailing list