X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Control%2FConcurrent%2FChan.hs;h=6b48e33c5cabbb2385eeee68d0d4885ef80bf2f8;hb=edc5c57d653289a1cf8dd2b05bf94ed25975e28a;hp=1b89f29e3e185717ea358b5cc1502f694f16ed3e;hpb=f77ec15be0f622df81980b757244d3401833c926;p=ghc-base.git diff --git a/Control/Concurrent/Chan.hs b/Control/Concurrent/Chan.hs index 1b89f29..6b48e33 100644 --- a/Control/Concurrent/Chan.hs +++ b/Control/Concurrent/Chan.hs @@ -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)