diff --git a/pkcs10.cabal b/pkcs10.cabal
--- a/pkcs10.cabal
+++ b/pkcs10.cabal
@@ -1,5 +1,5 @@
 name:                pkcs10
-version:             0.1.0.0
+version:             0.1.0.1
 synopsis:            PKCS#10 library
 description:         Please see README.md
 homepage:            https://github.com/fcomb/pkcs10-hs#readme
diff --git a/src/Data/X509/PKCS10.hs b/src/Data/X509/PKCS10.hs
--- a/src/Data/X509/PKCS10.hs
+++ b/src/Data/X509/PKCS10.hs
@@ -48,7 +48,6 @@
 import qualified Data.ByteString          as B
 import qualified Data.ByteString.Char8    as BC
 import           Data.PEM
-import           Data.Typeable
 import           Data.X509
 
 -- | A list of X520 attributes.
@@ -127,7 +126,7 @@
 
 -- | A list of PKCS9 extension attributes.
 data PKCS9Attribute =
-  forall e . (Extension e, Show e, Eq e, Typeable e) => PKCS9Attribute e
+  forall e . (Extension e, Show e, Eq e) => PKCS9Attribute e
 
 -- | PKCS9 extension attributes.
 newtype PKCS9Attributes =
@@ -138,9 +137,7 @@
 
 instance Eq PKCS9Attribute where
    (PKCS9Attribute x) == (PKCS9Attribute y) =
-     case cast y of
-       Just y' -> x == y'
-       Nothing -> False
+     show x == show y
 
 -- | X520 attributes.
 newtype X520Attributes =
@@ -296,7 +293,7 @@
       [2,5,29,37] -> f (decode :: Either String ExtExtendedKeyUsage)
       _ -> Left "fromASN1: PKCS9.Attribute: unknown oid"
     where
-      decode :: forall e . (Extension e, Show e, Eq e, Typeable e) => Either String e
+      decode :: forall e . (Extension e, Show e, Eq e) => Either String e
       decode = extDecode =<< decodeDER os
       f (Right attr) = Right (PKCS9Attribute attr, xs)
       f (Left e) = Left e
diff --git a/test/Spec.hs b/test/Spec.hs
--- a/test/Spec.hs
+++ b/test/Spec.hs
@@ -1,5 +1,6 @@
 module Main where
 
+import           Control.Applicative      ((<$>), (<*>))
 import           Crypto.Hash
 import qualified Crypto.PubKey.DSA        as DSA
 import qualified Crypto.PubKey.RSA        as RSA
