Eq instance for Chan
mmitar at gmail.com
Wed Nov 24 19:48:21 EST 2010
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
Is there some other way to achieve this?
More information about the Glasgow-haskell-users