[project @ 2004-12-14 12:52:03 by simonmar]
[ghc-base.git] / Control / Concurrent / Chan.hs
index 09afdb5..6b48e33 100644 (file)
@@ -34,6 +34,9 @@ import Prelude
 
 import System.IO.Unsafe                ( unsafeInterleaveIO )
 import Control.Concurrent.MVar
+import Data.Typeable
+
+#include "Typeable.h"
 
 -- A channel is represented by two @MVar@s keeping track of the two ends
 -- of the channel contents,i.e.,  the read- and write ends. Empty @MVar@s
@@ -44,6 +47,8 @@ data Chan a
  = Chan (MVar (Stream a))
         (MVar (Stream a))
 
+INSTANCE_TYPEABLE1(Chan,chanTc,"Chan")
+
 type Stream a = MVar (ChItem a)
 
 data ChItem a = ChItem a (Stream a)
@@ -113,7 +118,7 @@ isEmptyChan (Chan read write) = do
 -- Operators for interfacing with functional streams.
 
 -- |Return a lazy list representing the contents of the supplied
--- 'Chan', much like 'IO.hGetContents'.
+-- 'Chan', much like 'System.IO.hGetContents'.
 getChanContents :: Chan a -> IO [a]
 getChanContents ch
   = unsafeInterleaveIO (do