[commit: stm] master: Give TChan an Eq instance. (6f0311d)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.libraries
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/packages/stm

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6f0311ddf63480ff2bb0b220eea08379e94c950d

>---------------------------------------------------------------

commit 6f0311ddf63480ff2bb0b220eea08379e94c950d
Author: Joey Adams <[email protected]>
Date:   Fri Mar 2 21:05:28 2012 -0500

    Give TChan an Eq instance.
    
    TVar, TMVar, TArray, and Chan all have Eq instances.
    Why doesn't TChan have one, too?

>---------------------------------------------------------------

 Control/Concurrent/STM/TChan.hs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Control/Concurrent/STM/TChan.hs b/Control/Concurrent/STM/TChan.hs
index 713624e..7c30dd8 100644
--- a/Control/Concurrent/STM/TChan.hs
+++ b/Control/Concurrent/STM/TChan.hs
@@ -48,7 +48,7 @@ import Data.Typeable (Typeable)
 -- | 'TChan' is an abstract type representing an unbounded FIFO channel.
 data TChan a = TChan _UPK_(TVar (TVarList a))
                      _UPK_(TVar (TVarList a))
-  deriving Typeable
+  deriving (Eq, Typeable)
 
 type TVarList a = TVar (TList a)
 data TList a = TNil | TCons a _UPK_(TVarList a)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.