From 4aff5310630a9fde9b50e4084cbd85f532452fdf Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Sat, 8 Mar 2008 01:40:40 +0000 Subject: [PATCH] untabify --- Control/Concurrent/QSemN.hs | 16 ++++++++-------- Control/Concurrent/SampleVar.hs | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Control/Concurrent/QSemN.hs b/Control/Concurrent/QSemN.hs index 56c5e50..ed96a3c 100644 --- a/Control/Concurrent/QSemN.hs +++ b/Control/Concurrent/QSemN.hs @@ -14,11 +14,11 @@ ----------------------------------------------------------------------------- module Control.Concurrent.QSemN - ( -- * General Quantity Semaphores - QSemN, -- abstract - newQSemN, -- :: Int -> IO QSemN - waitQSemN, -- :: QSemN -> Int -> IO () - signalQSemN -- :: QSemN -> Int -> IO () + ( -- * General Quantity Semaphores + QSemN, -- abstract + newQSemN, -- :: Int -> IO QSemN + waitQSemN, -- :: QSemN -> Int -> IO () + signalQSemN -- :: QSemN -> Int -> IO () ) where import Prelude @@ -63,8 +63,8 @@ signalQSemN (QSemN sem) n = do free avail [] = return (avail,[]) free avail ((req,block):blocked) | avail >= req = do - putMVar block () - free (avail-req) blocked + putMVar block () + free (avail-req) blocked | otherwise = do - (avail',blocked') <- free avail blocked + (avail',blocked') <- free avail blocked return (avail',(req,block):blocked') diff --git a/Control/Concurrent/SampleVar.hs b/Control/Concurrent/SampleVar.hs index 4d88a19..8084757 100644 --- a/Control/Concurrent/SampleVar.hs +++ b/Control/Concurrent/SampleVar.hs @@ -14,15 +14,15 @@ module Control.Concurrent.SampleVar ( - -- * Sample Variables + -- * Sample Variables SampleVar, -- :: type _ = - newEmptySampleVar, -- :: IO (SampleVar a) + newEmptySampleVar, -- :: IO (SampleVar a) newSampleVar, -- :: a -> IO (SampleVar a) - emptySampleVar, -- :: SampleVar a -> IO () - readSampleVar, -- :: SampleVar a -> IO a - writeSampleVar, -- :: SampleVar a -> a -> IO () - isEmptySampleVar, -- :: SampleVar a -> IO Bool + emptySampleVar, -- :: SampleVar a -> IO () + readSampleVar, -- :: SampleVar a -> IO a + writeSampleVar, -- :: SampleVar a -> a -> IO () + isEmptySampleVar, -- :: SampleVar a -> IO Bool ) where @@ -47,9 +47,9 @@ import Control.Concurrent.MVar -- (different from 'putMVar' on full 'MVar'.) type SampleVar a - = MVar (Int, -- 1 == full - -- 0 == empty - -- <0 no of readers blocked + = MVar (Int, -- 1 == full + -- 0 == empty + -- <0 no of readers blocked MVar a) -- |Build a new, empty, 'SampleVar' -- 1.7.10.4