projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0f41d4
)
Added a Typeable instance for SampleVar
author
Bas van Dijk
<v.dijk.bas@gmail.com>
Sat, 27 Nov 2010 09:11:51 +0000
(09:11 +0000)
committer
Bas van Dijk
<v.dijk.bas@gmail.com>
Sat, 27 Nov 2010 09:11:51 +0000
(09:11 +0000)
Control/Concurrent/SampleVar.hs
patch
|
blob
|
history
diff --git
a/Control/Concurrent/SampleVar.hs
b/Control/Concurrent/SampleVar.hs
index
68e4b30
..
7d1a00d
100644
(file)
--- 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