Commit abcfc36e authored by sof's avatar sof
Browse files

[project @ 1999-01-14 18:21:49 by sof]

Haskell 98 related changes + the addition of the MVar primop,

   isEmptyMVar :: MVar a -> IO Bool
     -- use with care.
parent 08af80d8
......@@ -111,6 +111,6 @@ getChanContents ch
-------------
writeList2Chan :: Chan a -> [a] -> IO ()
writeList2Chan ch ls = sequence (map (writeChan ch) ls)
writeList2Chan ch ls = sequence_ (map (writeChan ch) ls)
\end{code}
......@@ -11,9 +11,9 @@ module ChannelVar
(
{- abstract -}
CVar,
newCVar, --:: IO (CVar a)
writeCVar, --:: CVar a -> a -> IO ()
readCVar, --:: CVar a -> IO a
newCVar, -- :: IO (CVar a)
writeCVar, -- :: CVar a -> a -> IO ()
readCVar, -- :: CVar a -> IO a
MVar
) where
......
......@@ -10,8 +10,8 @@ IO monad.
module Merge
(
mergeIO, --:: [a] -> [a] -> IO [a]
nmergeIO --:: [[a]] -> IO [a]
mergeIO, -- :: [a] -> [a] -> IO [a]
nmergeIO -- :: [[a]] -> IO [a]
) where
import Semaphore
......
......@@ -19,13 +19,13 @@ potentially, wakes up a blocked reader (same as for @putMVar@ on empty @MVar@).
\begin{code}
module SampleVar
(
SampleVar, --:: type _ =
SampleVar, -- :: type _ =
newEmptySampleVar, --:: IO (SampleVar a)
newSampleVar, --:: a -> IO (SampleVar a)
emptySampleVar, --:: SampleVar a -> IO ()
readSampleVar, --:: SampleVar a -> IO a
writeSampleVar --:: SampleVar a -> a -> IO ()
newEmptySampleVar, -- :: IO (SampleVar a)
newSampleVar, -- :: a -> IO (SampleVar a)
emptySampleVar, -- :: SampleVar a -> IO ()
readSampleVar, -- :: SampleVar a -> IO a
writeSampleVar -- :: SampleVar a -> a -> IO ()
) where
......
......@@ -11,15 +11,15 @@ module Semaphore
{- abstract -}
QSem,
newQSem, --:: Int -> IO QSem
waitQSem, --:: QSem -> IO ()
signalQSem, --:: QSem -> IO ()
newQSem, -- :: Int -> IO QSem
waitQSem, -- :: QSem -> IO ()
signalQSem, -- :: QSem -> IO ()
{- abstract -}
QSemN,
newQSemN, --:: Int -> IO QSemN
waitQSemN, --:: QSemN -> Int -> IO ()
signalQSemN --:: QSemN -> Int -> IO ()
newQSemN, -- :: Int -> IO QSemN
waitQSemN, -- :: QSemN -> Int -> IO ()
signalQSemN -- :: QSemN -> Int -> IO ()
) where
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment