Derived Eq instance for QSem and QSemN
authorBas van Dijk <v.dijk.bas@gmail.com>
Wed, 1 Dec 2010 08:03:07 +0000 (08:03 +0000)
committerBas van Dijk <v.dijk.bas@gmail.com>
Wed, 1 Dec 2010 08:03:07 +0000 (08:03 +0000)
Control/Concurrent/QSem.hs
Control/Concurrent/QSemN.hs

index 59ffbc7..8e8a301 100644 (file)
@@ -36,7 +36,7 @@ import Data.Typeable
 
 -- |A 'QSem' is a simple quantity semaphore, in which the available
 -- \"quantity\" is always dealt with in units of one.
-newtype QSem = QSem (MVar (Int, [MVar ()]))
+newtype QSem = QSem (MVar (Int, [MVar ()])) deriving Eq
 
 INSTANCE_TYPEABLE0(QSem,qSemTc,"QSem")
 
index 30c6785..7e43908 100644 (file)
@@ -31,7 +31,7 @@ import Data.Typeable
 
 -- |A 'QSemN' is a quantity semaphore, in which the available
 -- \"quantity\" may be signalled or waited for in arbitrary amounts.
-newtype QSemN = QSemN (MVar (Int,[(Int,MVar ())]))
+newtype QSemN = QSemN (MVar (Int,[(Int,MVar ())])) deriving Eq
 
 INSTANCE_TYPEABLE0(QSemN,qSemNTc,"QSemN")