diff --git a/Data/Generics/Alloy/GenInstances.hs b/Data/Generics/Alloy/GenInstances.hs
--- a/Data/Generics/Alloy/GenInstances.hs
+++ b/Data/Generics/Alloy/GenInstances.hs
@@ -599,7 +599,7 @@
 
     -- | An instance that describes how to apply -- or not apply -- a
     -- transformation.
-    otherInst :: Data s => TypeRepKey -> Set.Set TypeRepKey -> s -> TypeRepKey -> [String]
+    otherInst :: Data s => TypeRep -> Set.Set TypeRep -> s -> TypeRep -> [String]
     otherInst wKey containedKeys c cKey
         = if not shouldGen then [] else
             genInst context
@@ -716,11 +716,11 @@
 instance Eq DataBox where
   (==) (DataBox x) (DataBox y) = typeOf x == typeOf y
 
-type TypeMap = Map TypeRepKey (String, Witness)
+type TypeMap = Map TypeRep (String, Witness)
 type TypeMapM = StateT TypeMap IO
 
-typeKey :: Typeable t => t -> IO TypeRepKey
-typeKey x = typeRepKey $ typeOf x
+typeKey :: Typeable t => t -> IO TypeRep
+typeKey x = return $ typeOf x
 
 toQualName :: Typeable t => t -> String
 toQualName w = fst (toQualNameMod w)
@@ -764,7 +764,7 @@
     doType :: Data t => t -> TypeMapM ()
     doType x
         =  do map <- get
-              key <- liftIO $ typeRepKey rep
+              key <- liftIO $ return $ typeOf rep
               when (not $ key `Map.member` map) $
                  do modify $ Map.insert key (reps, Plain (DataBox x))
                     case custom $ DataBox x of
diff --git a/alloy.cabal b/alloy.cabal
--- a/alloy.cabal
+++ b/alloy.cabal
@@ -1,5 +1,5 @@
 Name: alloy
-Version: 1.2.0
+Version: 1.2.1
 License: BSD3
 License-File: LICENSE
 Author: Neil Brown and Adam Sampson
