-{-
%
% (c) The GRASP/AQUA Project, Glasgow University, 1995
%
Haskell paper (available from @ftp://ftp.dcs.gla.ac.uk/pub/glasgow-fp/drafts@)
\begin{code}
--}
module ChannelVar
(
{- abstract -}
) where
-import GHCbase
-{-
+import ConcBase
\end{code}
@MVars@ provide the basic mechanisms for synchronising access to a shared
a consumer to remove the previous value before it can deposit a new one in the @CVar@.
\begin{code}
--}
data CVar a
= CVar (MVar a) -- prod -> cons
= takeMVar datum >>= \ val ->
putMVar ack () >>
return val
+\end{code}