Make Chan an instance of Eq

Hi! Chan should be an instance of Eq. I opened a ticket for this with a patch: http://hackage.haskell.org/trac/ghc/ticket/4526 Mitar

On Thu, Nov 25, 2010 at 12:18 PM, Mitar
Hi!
Chan should be an instance of Eq. I opened a ticket for this with a patch:
Hello! 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). Either way, you may want to add some text describing which way it is. Antoine

Hi!
On Thu, Nov 25, 2010 at 8:39 PM, Antoine Latter
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. Mitar

On Thu, Nov 25, 2010 at 10:26 PM, Mitar
Hi!
On Thu, Nov 25, 2010 at 8:39 PM, Antoine Latter
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@.)" Regards, Bas P.S. What about a short deadline of a week for this proposal?

On Thu, Nov 25, 2010 at 10:40 PM, Mitar
On Thu, Nov 25, 2010 at 10:35 PM, Bas van Dijk
wrote: What about a short deadline of a week for this proposal?
I am/was not really sure what you meant by that?
Library proposals should have a timescale for consideration (to focus the community's attention for a limited period). IMHO a deadline of a week is enough for this proposal because I think it's trivial. At the end of the discussion period, if consensus was achieved, set the ticket state to "patch" so that someone will commit it for you. Bas

Hi!
On Thu, Nov 25, 2010 at 10:50 PM, Bas van Dijk
Library proposals should have a timescale for consideration (to focus the community's attention for a limited period). IMHO a deadline of a week is enough for this proposal because I think it's trivial.
Where do I announce/set this timescale? Just tell/propose that it is a week? Mitar

On Thu, Nov 25, 2010 at 10:59 PM, Mitar
On Thu, Nov 25, 2010 at 10:50 PM, Bas van Dijk
wrote: Library proposals should have a timescale for consideration (to focus the community's attention for a limited period). IMHO a deadline of a week is enough for this proposal because I think it's trivial.
Where do I announce/set this timescale? Just tell/propose that it is a week?
Yes that should be enough. It would be nice to also include it in the patch though. Bas

On Fri, Nov 26, 2010 at 11:40 PM, Mitar
And SampleVar could also be an instance of Eq
It already is.
and Typable.
Good point! Proposal with patch: http://hackage.haskell.org/trac/ghc/ticket/4537 Let's also discuss (not that there's much to discuss) this proposal in this thread. Regards, Bas

Hi!
On Sat, Nov 27, 2010 at 10:30 AM, Bas van Dijk
Proposal with patch: http://hackage.haskell.org/trac/ghc/ticket/4537
Ah, we have a duplicate. ;-( Sorry, I haven't managed to report it yesterday to the mailing list: http://hackage.haskell.org/trac/ghc/ticket/4536 Mitar

On Fri, 2010-11-26 at 00:03 +0100, Mitar wrote:
Hi!
Yes that should be enough. It would be nice to also include it in the patch though.
OK. So:
I am proposing a week to discus things. Starting now.
Seems a perfectly reasonable proposal. Given that IO variables such as IORef, MVar, TVar etc are all in Eq, then other mutable objects with reference semantics such as Chan can also reasonably be in Eq. What about QSem and QSemN? The same reasoning apply to them doesn't it? Duncan

On Thu, Nov 25, 2010 at 7:18 PM, Mitar
Chan should be an instance of Eq. I opened a ticket for this with a patch:
Mitar, since no objections were raised, I think you can move your ticket to the 'patch' state so that it can be reviewed an applied. Thanks, Bas P.S. I also moved the related ticket "Make SampleVar an instance of Typeable" to the patch state: http://hackage.haskell.org/trac/ghc/ticket/4537

Hi!
On Mon, Dec 20, 2010 at 11:12 PM, Bas van Dijk
Mitar, since no objections were raised, I think you can move your ticket to the 'patch' state so that it can be reviewed an applied.
Thanks. I just have.
I also moved the related ticket "Make SampleVar an instance of Typeable" to the patch state: http://hackage.haskell.org/trac/ghc/ticket/4537
Thanks. Mitar
participants (4)
-
Antoine Latter
-
Bas van Dijk
-
Duncan Coutts
-
Mitar