diff --git a/SafeSemaphore.cabal b/SafeSemaphore.cabal
--- a/SafeSemaphore.cabal
+++ b/SafeSemaphore.cabal
@@ -1,5 +1,5 @@
 Name:                SafeSemaphore
-Version:             0.9.0
+Version:             0.10.0
 Synopsis:            Much safer replacement for QSemN, QSem, and SampleVar
 Description:         This provides a much safer semaphore than the QSem, QSemN, SampleVar in base.
                      Those base modules are not exception safe and can be broken by killThread.
diff --git a/src/Control/Concurrent/MSampleVar.hs b/src/Control/Concurrent/MSampleVar.hs
--- a/src/Control/Concurrent/MSampleVar.hs
+++ b/src/Control/Concurrent/MSampleVar.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveDataTypeable, CPP #-}
 --
 -- Module      :  Control.Concurrent.MSampleVar
 -- Copyright   :  (c) Chris Kuklewicz 2011
@@ -30,7 +30,7 @@
 import Control.Monad(void,join)
 import Control.Concurrent.MVar(MVar,newMVar,newEmptyMVar,tryTakeMVar,takeMVar,putMVar,withMVar,isEmptyMVar)
 import Control.Exception(mask_)
-import Data.Typeable(Typeable1(typeOf1),mkTyCon,mkTyConApp)
+import Data.Typeable
 
 -- |
 -- Sample variables are slightly different from a normal 'MVar':
@@ -60,11 +60,17 @@
 -- value possible while still guaranteeing progress.
 data MSampleVar a = MSampleVar { readQueue :: MVar ()
                                , lockedStore :: MVar (MVar a) }
-  deriving (Eq)
+  deriving ( Eq
+#if __GLASGOW_HASKELL__ >= 707
+           , Typeable
+#endif
+           )
 
+#if __GLASGOW_HASKELL__ < 707
 instance Typeable1 MSampleVar where
   typeOf1 _ = mkTyConApp tc []
     where tc = mkTyCon "MSampleVar"
+#endif
 
 
 -- | 'newEmptySV' allocates a new MSampleVar in an empty state.  No futher
diff --git a/src/Control/Concurrent/STM/SSemInternals.hs b/src/Control/Concurrent/STM/SSemInternals.hs
--- a/src/Control/Concurrent/STM/SSemInternals.hs
+++ b/src/Control/Concurrent/STM/SSemInternals.hs
@@ -20,8 +20,17 @@
 import Control.Concurrent.STM.TVar(TVar)
 import Data.Typeable(Typeable) -- Typeable(typeOf),TyCon,mkTyCon,mkTyConApp)
 
+#if __GLASGOW_HASKELL__ < 707
 #include "Typeable.h"
+#endif
 
-newtype SSem = SSem (TVar Int)  deriving (Eq)
+newtype SSem = SSem (TVar Int)
+             deriving ( Eq
+#if __GLASGOW_HASKELL__ >= 707
+                      , Typeable
+#endif
+                      )
 
+#if __GLASGOW_HASKELL__ < 707
 INSTANCE_TYPEABLE0(SSem,semTc,"SSem")
+#endif
