-{-
%
% (c) The GRASP/AQUA Project, Glasgow University, 1995
%
\item Writing to a filled @SampleVar@ overwrites the current value.
(different from @putMVar@ on full @MVar@.)
\end{itemize}
--}
+\begin{code}
module SampleVar
(
SampleVar, --:: type _ =
) where
-import GHCbase
+import ConcBase
+
type SampleVar a
= MVar (Int, -- 1 == full
_ ->
putMVar val v >>
putMVar svar (min 1 (readers+1), val)
+\end{code}