From 6528f4e902ce806f6c6b394aad7084452df33e06 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sat, 27 Nov 2010 09:11:51 +0000 Subject: [PATCH] Added a Typeable instance for SampleVar --- Control/Concurrent/SampleVar.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Control/Concurrent/SampleVar.hs b/Control/Concurrent/SampleVar.hs index 68e4b30..7d1a00d 100644 --- a/Control/Concurrent/SampleVar.hs +++ b/Control/Concurrent/SampleVar.hs @@ -34,6 +34,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 +62,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 -- 1.7.10.4