diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -1,3 +1,7 @@
+3.1.2
+-----
+* Marked modules `Trustworthy` as required for `SafeHaskell` in the presence of these extensions.
+
 3.1.1
 -----
 * Refactored build system
diff --git a/kan-extensions.cabal b/kan-extensions.cabal
--- a/kan-extensions.cabal
+++ b/kan-extensions.cabal
@@ -1,6 +1,6 @@
 name:          kan-extensions
 category:      Data Structures, Monads, Comonads, Functors
-version:       3.1.1
+version:       3.1.2
 license:       BSD3
 cabal-version: >= 1.6
 license-file:  LICENSE
@@ -40,21 +40,21 @@
     TypeFamilies
 
   build-depends:
-    adjunctions            >= 3.0.0.1,
+    adjunctions            >= 3.0.0.1 && < 4,
     array                  >= 0.3.0.2 && < 0.5,
-    base                   == 4.*,
-    comonad                >= 3,
-    comonad-transformers   >= 3,
-    comonads-fd            >= 3,
+    base                   >= 4       && < 5,
+    comonad                >= 3       && < 4,
+    comonad-transformers   >= 3       && < 4,
+    comonads-fd            >= 3       && < 4,
     containers             >= 0.4     && < 0.6,
-    contravariant          >= 0.2.0.1,
-    distributive           >= 0.2.2,
-    free                   >= 3,
-    keys                   >= 3,
+    contravariant          >= 0.2.0.1 && < 1,
+    distributive           >= 0.2.2   && < 1,
+    free                   >= 3       && < 4,
+    keys                   >= 3       && < 4,
     mtl                    >= 2.0.1   && < 2.2,
-    representable-functors >= 3.0.0.1,
-    semigroupoids          >= 3,
-    speculation            >= 1.4.1,
+    representable-functors >= 3.0.0.1 && < 4,
+    semigroupoids          >= 3       && < 4,
+    speculation            >= 1.4.1   && < 2,
     transformers           >= 0.2     && < 0.4
 
   exposed-modules:
diff --git a/src/Control/Comonad/Density.hs b/src/Control/Comonad/Density.hs
--- a/src/Control/Comonad/Density.hs
+++ b/src/Control/Comonad/Density.hs
@@ -1,4 +1,8 @@
 {-# LANGUAGE MultiParamTypeClasses, GADTs #-}
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Control.Comonad.Density
diff --git a/src/Control/Monad/Co.hs b/src/Control/Monad/Co.hs
--- a/src/Control/Monad/Co.hs
+++ b/src/Control/Monad/Co.hs
@@ -3,6 +3,13 @@
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE UndecidableInstances #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
+#ifndef MIN_VERSION_speculation
+#define MIN_VERSION_speculation(x,y,z) 1
+#endif
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Control.Monad.Co
@@ -50,7 +57,9 @@
 
 instance Comonad w => MonadSpec (CoT w m) where
   specByM f g a = CoT (\k -> specBy f g (extract k) a)
+#if !(MIN_VERSION_speculation(1,5,0))
   specByM' f g a = CoT (\k -> specBy' f g (extract k) a)
+#endif
 
 type Co w = CoT w Identity
 
diff --git a/src/Control/Monad/Codensity.hs b/src/Control/Monad/Codensity.hs
--- a/src/Control/Monad/Codensity.hs
+++ b/src/Control/Monad/Codensity.hs
@@ -1,4 +1,12 @@
 {-# LANGUAGE Rank2Types, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-}
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
+
+#ifndef MIN_VERSION_speculation
+#define MIN_VERSION_speculation(x,y,z) 1
+#endif
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Control.Monad.Codensity
@@ -36,7 +44,9 @@
 
 instance MonadSpec (Codensity m) where
   specByM f g a = Codensity $ \k -> specBy f g k a
+#if !(MIN_VERSION_speculation(1,5,0))
   specByM' f g a = Codensity $ \k -> specBy' f g k a
+#endif
 
 instance Functor (Codensity k) where
   fmap f (Codensity m) = Codensity (\k -> m (k . f))
diff --git a/src/Data/Functor/KanExtension.hs b/src/Data/Functor/KanExtension.hs
--- a/src/Data/Functor/KanExtension.hs
+++ b/src/Data/Functor/KanExtension.hs
@@ -1,4 +1,8 @@
 {-# LANGUAGE Rank2Types, GADTs #-}
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
 -------------------------------------------------------------------------------------------
 -- |
 -- Module	: Data.Functor.KanExtension
diff --git a/src/Data/Functor/Yoneda.hs b/src/Data/Functor/Yoneda.hs
--- a/src/Data/Functor/Yoneda.hs
+++ b/src/Data/Functor/Yoneda.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE TypeFamilies, CPP, Rank2Types, FlexibleContexts, MultiParamTypeClasses, UndecidableInstances, FlexibleInstances #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Functor.Yoneda
diff --git a/src/Data/Functor/Yoneda/Contravariant.hs b/src/Data/Functor/Yoneda/Contravariant.hs
--- a/src/Data/Functor/Yoneda/Contravariant.hs
+++ b/src/Data/Functor/Yoneda/Contravariant.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE CPP, GADTs, FlexibleContexts, MultiParamTypeClasses, UndecidableInstances, TypeFamilies #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Functor.Yoneda.Contravariant
