Make Chan an instance of Eq

Bas van Dijk v.dijk.bas at
Thu Nov 25 16:35:29 EST 2010

On Thu, Nov 25, 2010 at 10:26 PM, Mitar <mmitar at> wrote:
> Hi!
> On Thu, Nov 25, 2010 at 8:39 PM, Antoine Latter <aslatter at> wrote:
>> I was confused by your other thread - should Chans test as equal if
>> one is duplicated from the other? With your current patch they do not
>> (I haven't tested it, though, only looked at it).
> I think it is OK that they are not equal if duplicated. Both MVar
> equality and Chan equality is more or less just reference equality.

Thanks for the proposal Mitar!

To avoid confusion I've added an updated patch which adds the following note
to dupChan:

"(Note that a duplicated channel is not equal to its original. So:
@fmap (c /=) $ dupChan c@ returns @True@ for all @c at .)"



What about a short deadline of a week for this proposal?

More information about the Libraries mailing list