Document that the initial quantity for QSem and QSemN must be >= 0
authorIan Lynagh <igloo@earth.li>
Sat, 23 May 2009 20:02:38 +0000 (20:02 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 23 May 2009 20:02:38 +0000 (20:02 +0000)
Control/Concurrent/QSem.hs
Control/Concurrent/QSemN.hs

index d069b89..cc78470 100644 (file)
@@ -39,7 +39,8 @@ newtype QSem = QSem (MVar (Int, [MVar ()]))
 
 INSTANCE_TYPEABLE0(QSem,qSemTc,"QSem")
 
--- |Build a new 'QSem'
+-- |Build a new 'QSem' with a supplied initial quantity.
+--  The initial quantity must be at least 0.
 newQSem :: Int -> IO QSem
 newQSem initial =
     if initial < 0
index 7ee6142..991b0d5 100644 (file)
@@ -35,6 +35,7 @@ newtype QSemN = QSemN (MVar (Int,[(Int,MVar ())]))
 INSTANCE_TYPEABLE0(QSemN,qSemNTc,"QSemN")
 
 -- |Build a new 'QSemN' with a supplied initial quantity.
+--  The initial quantity must be at least 0.
 newQSemN :: Int -> IO QSemN
 newQSemN initial =
     if initial < 0