From: Ian Lynagh Date: Sat, 23 May 2009 20:02:38 +0000 (+0000) Subject: Document that the initial quantity for QSem and QSemN must be >= 0 X-Git-Tag: 2009-06-25~32 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=45a54fd09e281c1b4eef3b610e90ea04e1def9b2;p=ghc-base.git Document that the initial quantity for QSem and QSemN must be >= 0 --- diff --git a/Control/Concurrent/QSem.hs b/Control/Concurrent/QSem.hs index d069b89..cc78470 100644 --- a/Control/Concurrent/QSem.hs +++ b/Control/Concurrent/QSem.hs @@ -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 diff --git a/Control/Concurrent/QSemN.hs b/Control/Concurrent/QSemN.hs index 7ee6142..991b0d5 100644 --- a/Control/Concurrent/QSemN.hs +++ b/Control/Concurrent/QSemN.hs @@ -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