X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Control%2FConcurrent%2FSampleVar.hs;h=ca68a38f76714e7d9d1761411ff68c7e9df4123f;hb=41e8fba828acbae1751628af50849f5352b27873;hp=68e4b308d69bb76f2eb33944425b785ec98329aa;hpb=1307901a3528834b706eb9336bd0a3ba88fe09f3;p=ghc-base.git diff --git a/Control/Concurrent/SampleVar.hs b/Control/Concurrent/SampleVar.hs index 68e4b30..ca68a38 100644 --- a/Control/Concurrent/SampleVar.hs +++ b/Control/Concurrent/SampleVar.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.SampleVar @@ -34,6 +36,10 @@ import Control.Exception ( mask_ ) import Data.Functor ( (<$>) ) +import Data.Typeable + +#include "Typeable.h" + -- | -- Sample variables are slightly different from a normal 'MVar': -- @@ -58,6 +64,8 @@ newtype SampleVar a = SampleVar ( MVar ( Int -- 1 == full ) deriving (Eq) +INSTANCE_TYPEABLE1(SampleVar,sampleVarTc,"SampleVar") + -- |Build a new, empty, 'SampleVar' newEmptySampleVar :: IO (SampleVar a) newEmptySampleVar = do