
Hi! Why is there no Eq instance for Chan? There is Eq for MVar so it is quite possible to define also Eq for Chan? What I would like to do is keep track how many consumers I have for each Chan so duplicating them with dupChan as necessary. So I was thinking of storing a list of Chans which already have a consumer and then duplicating it if another (and every additional) consumer would be added. But without Eq it is not possible to check if there is Chan already in a list (and I hope Eq would compare just Chan and not its content). Is there some other way to achieve this? Mitar

Hi!
On Thu, Nov 25, 2010 at 1:05 PM, Simon Marlow
It's just an oversight. Send us a patch, or make a ticket for it?
Done: http://hackage.haskell.org/trac/ghc/ticket/4526 Mitar

On 25 November 2010 13:47, Mitar
Hi!
On Thu, Nov 25, 2010 at 1:05 PM, Simon Marlow
wrote: It's just an oversight. Send us a patch, or make a ticket for it?
Done:
Free software in action!

On Thu, Nov 25, 2010 at 1:47 PM, Mitar
Hi!
On Thu, Nov 25, 2010 at 1:05 PM, Simon Marlow
wrote: It's just an oversight. Send us a patch, or make a ticket for it?
Done:
Nice! Officially your patch has to go through the "Library submission" process: http://www.haskell.org/haskellwiki/Library_submissions Since you already have a ticket the only thing left to do is convert your patch to a darcs patch and send a proposal to the libraries list. To save you some work I've created and tested the attached darcs patch that adds the single line "deriving Eq" to Control.Concurrent.Chan. If you want to create your own patch you need to get the GHC sources (which include the libraries). See: http://hackage.haskell.org/trac/ghc/wiki/Building Be sure to also include a deadline in your proposal. I think one week is enough. Regards, Bas

Hi!
On Thu, Nov 25, 2010 at 5:37 PM, Bas van Dijk
Officially your patch has to go through the "Library submission" process:
A bit overkill for one line but OK. ;-)
Since you already have a ticket the only thing left to do is convert your patch to a darcs patch and send a proposal to the libraries list.
I just have. I attached your patch to the ticket. Thanks. Mitar
participants (4)
-
Bas van Dijk
-
Christopher Done
-
Mitar
-
Simon Marlow