Added a Typeable instance for SampleVar
authorBas van Dijk <v.dijk.bas@gmail.com>
Sat, 27 Nov 2010 09:11:51 +0000 (09:11 +0000)
committerBas van Dijk <v.dijk.bas@gmail.com>
Sat, 27 Nov 2010 09:11:51 +0000 (09:11 +0000)
Control/Concurrent/SampleVar.hs

index 68e4b30..7d1a00d 100644 (file)
@@ -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