diff --git a/dependent-map.cabal b/dependent-map.cabal
--- a/dependent-map.cabal
+++ b/dependent-map.cabal
@@ -1,5 +1,5 @@
 name:                   dependent-map
-version:                0.1.1
+version:                0.1.1.1
 stability:              provisional
 
 cabal-version:          >= 1.6
@@ -15,7 +15,10 @@
 synopsis:               Dependent finite maps (partial dependent products)
 description:            Dependent finite maps (partial dependent products)
 
-tested-with:            GHC == 7.0.4, GHC == 6.12.3, GHC == 6.10.4
+tested-with:            GHC == 7.2.1,
+                        GHC == 7.0.4,
+                        GHC == 6.12.3,
+                        GHC == 6.10.4
 
 source-repository head
   type:     git
@@ -26,4 +29,8 @@
   ghc-options:          -fwarn-unused-imports -fwarn-unused-binds
   exposed-modules:      Data.Dependent.Map
   other-modules:        Data.Dependent.Map.Internal
+                        Data.Dependent.Map.Typeable
   build-depends:        base >= 3 && < 5, containers, dependent-sum
+  if impl(ghc >= 7.2)
+    build-depends:      dependent-sum >= 0.2.0.1
+    ghc-options:        -trust base -trust dependent-sum
diff --git a/src/Data/Dependent/Map.hs b/src/Data/Dependent/Map.hs
--- a/src/Data/Dependent/Map.hs
+++ b/src/Data/Dependent/Map.hs
@@ -2,6 +2,10 @@
 {-# LANGUAGE BangPatterns #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Safe #-}
+#endif
 module Data.Dependent.Map
     ( DMap
     , DSum(..), Key(..)
@@ -128,12 +132,12 @@
 
 import Prelude hiding (null, lookup)
 import Data.Dependent.Map.Internal
+import Data.Dependent.Map.Typeable ({- instance Typeable ... -})
 
 import Data.Dependent.Sum
 import Data.GADT.Compare
 import Data.Maybe (isJust)
 import Data.Monoid
-import Data.Typeable
 import Text.Read
 
 instance (GCompare k) => Monoid (DMap k) where
@@ -1123,17 +1127,6 @@
 withBar, withEmpty :: [String] -> [String]
 withBar bars   = "|  ":bars
 withEmpty bars = "   ":bars
-
-{--------------------------------------------------------------------
-  Typeable
---------------------------------------------------------------------}
-
-instance Typeable1 f => Typeable (DMap f) where
-    typeOf ds = mkTyConApp dMapCon [typeOfT]
-        where
-            dMapCon = mkTyCon "Data.Dependent.Map.DMap"
-            typeOfT = typeOf1 $ (undefined :: DMap f -> f a) ds
-    
 
 {--------------------------------------------------------------------
   Assertions
diff --git a/src/Data/Dependent/Map/Internal.hs b/src/Data/Dependent/Map/Internal.hs
--- a/src/Data/Dependent/Map/Internal.hs
+++ b/src/Data/Dependent/Map/Internal.hs
@@ -1,5 +1,9 @@
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Safe #-}
+#endif
 module Data.Dependent.Map.Internal where
 
 import Data.Dependent.Sum
diff --git a/src/Data/Dependent/Map/Typeable.hs b/src/Data/Dependent/Map/Typeable.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Dependent/Map/Typeable.hs
@@ -0,0 +1,26 @@
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
+module Data.Dependent.Map.Typeable where
+
+import Data.Dependent.Map.Internal
+import Data.Typeable
+
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+
+instance Typeable1 f => Typeable (DMap f) where
+    typeOf ds = mkTyConApp dMapCon [typeOfT]
+        where
+            dMapCon = mkTyCon3 "dependent-map" "Data.Dependent.Map" "DMap"
+            typeOfT = typeOf1 $ (undefined :: DMap f -> f a) ds
+
+#else
+
+instance Typeable1 f => Typeable (DMap f) where
+    typeOf ds = mkTyConApp dMapCon [typeOfT]
+        where
+            dMapCon = mkTyCon "Data.Dependent.Map.DMap"
+            typeOfT = typeOf1 $ (undefined :: DMap f -> f a) ds
+
+#endif
