diff --git a/Control/Invertible/Functor.hs b/Control/Invertible/Functor.hs
--- a/Control/Invertible/Functor.hs
+++ b/Control/Invertible/Functor.hs
@@ -5,7 +5,10 @@
 -- 
 -- > import qualified Control.Invertible.Functor as Inv
 --
-{-# LANGUAGE CPP, Safe, TypeOperators, FlexibleInstances #-}
+{-# LANGUAGE CPP, TypeOperators, FlexibleInstances #-}
+#if !(defined(VERSION_semigroupoids) && MIN_VERSION_semigroupoids(5,2,2))
+{-# LANGUAGE Safe #-}
+#endif
 module Control.Invertible.Functor
   ( Functor(..)
   , fmapDefault
diff --git a/Control/Invertible/MonadArrow.hs b/Control/Invertible/MonadArrow.hs
--- a/Control/Invertible/MonadArrow.hs
+++ b/Control/Invertible/MonadArrow.hs
@@ -7,9 +7,12 @@
 -- * @m a '<->' m b@
 --
 -- The Alimarine paper just calls it \"MoT\" for Monad Transformer.
-{-# LANGUAGE CPP, Safe, TupleSections, FlexibleInstances, FlexibleContexts #-}
+{-# LANGUAGE CPP, TupleSections, FlexibleInstances, FlexibleContexts #-}
 {-# LANGUAGE QuasiQuotes #-}
 {-# LANGUAGE TypeOperators #-}
+#if !(defined(VERSION_semigroupoids) && MIN_VERSION_semigroupoids(5,2,2))
+{-# LANGUAGE Safe #-}
+#endif
 module Control.Invertible.MonadArrow
   ( MonadArrow(..)
   , MonadFunction
diff --git a/Control/Invertible/Monoidal.hs b/Control/Invertible/Monoidal.hs
--- a/Control/Invertible/Monoidal.hs
+++ b/Control/Invertible/Monoidal.hs
@@ -2,7 +2,10 @@
 -- Invariant monoidal functors.
 -- 
 -- This roughly corresponds to "Control.Applicative", but exposes a non-overlapping API so can be imported unqualified.  It does, however, use operators similar to those provided by contravariant.
-{-# LANGUAGE CPP, Safe, TypeOperators, FlexibleInstances #-}
+{-# LANGUAGE CPP, TypeOperators, FlexibleInstances #-}
+#if !(defined(VERSION_semigroupoids) && MIN_VERSION_semigroupoids(5,2,2))
+{-# LANGUAGE Safe #-}
+#endif
 module Control.Invertible.Monoidal
   ( Bijection(..)
   , I.biCase
diff --git a/Control/Invertible/Monoidal/Free.hs b/Control/Invertible/Monoidal/Free.hs
--- a/Control/Invertible/Monoidal/Free.hs
+++ b/Control/Invertible/Monoidal/Free.hs
@@ -1,7 +1,11 @@
-{-# LANGUAGE Safe, GADTs, RankNTypes, TupleSections, TypeOperators, QuasiQuotes #-}
 -- |
 -- A vague analog of free monads for invariant monoidals.
 -- This can provide a simple basis for things like invertible parsers.
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE GADTs, RankNTypes, TupleSections, TypeOperators, QuasiQuotes #-}
+#if !(defined(VERSION_semigroupoids) && MIN_VERSION_semigroupoids(5,2,2))
+{-# LANGUAGE Safe #-}
+#endif
 module Control.Invertible.Monoidal.Free
   ( Free(..)
   , showsFree
diff --git a/Data/Invertible.hs b/Data/Invertible.hs
--- a/Data/Invertible.hs
+++ b/Data/Invertible.hs
@@ -7,7 +7,10 @@
 -- 
 -- > import qualified Data.Invertible as Inv
 --
+{-# LANGUAGE CPP #-}
+#if !(defined(VERSION_semigroupoids) && MIN_VERSION_semigroupoids(5,2,2))
 {-# LANGUAGE Safe #-}
+#endif
 module Data.Invertible
   ( module Data.Invertible.Bijection
   , module Data.Invertible.TH
diff --git a/Data/Invertible/Prelude.hs b/Data/Invertible/Prelude.hs
--- a/Data/Invertible/Prelude.hs
+++ b/Data/Invertible/Prelude.hs
@@ -1,7 +1,11 @@
 -- |
 -- The bidirectional \"Prelude\", which re-exports various bijections similar to functions from "Prelude".
 -- Most \"un\"-functions are left out for obvious reasons.
-{-# LANGUAGE Safe, TypeOperators #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE TypeOperators #-}
+#if !(defined(VERSION_semigroupoids) && MIN_VERSION_semigroupoids(5,2,2))
+{-# LANGUAGE Safe #-}
+#endif
 module Data.Invertible.Prelude
   ( (<->)
   , type (<->)
diff --git a/invertible.cabal b/invertible.cabal
--- a/invertible.cabal
+++ b/invertible.cabal
@@ -1,5 +1,5 @@
 name:                invertible
-version:             0.2.0.2
+version:             0.2.0.3
 synopsis:            bidirectional arrows, bijective functions, and invariant functors
 description:
   Representations and operations for bidirectional arrows (total isomorphisms: an
@@ -82,7 +82,7 @@
   build-depends:
     base >= 4.8 && <5,
     transformers,
-    haskell-src-meta >= 0.6 && < 0.8,
+    haskell-src-meta >= 0.6 && < 0.9,
     template-haskell == 2.*
   default-language:    Haskell2010
   ghc-options: -Wall
