From 45a54fd09e281c1b4eef3b610e90ea04e1def9b2 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 23 May 2009 20:02:38 +0000 Subject: [PATCH] Document that the initial quantity for QSem and QSemN must be >= 0 --- Control/Concurrent/QSem.hs | 3 ++- Control/Concurrent/QSemN.hs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- 1.7.10.4