diff --git a/yaml-light-lens.cabal b/yaml-light-lens.cabal
--- a/yaml-light-lens.cabal
+++ b/yaml-light-lens.cabal
@@ -1,5 +1,5 @@
 name:                yaml-light-lens
-version:             0.3.1.8
+version:             0.3.1.9
 synopsis:            Lens interface to yaml-light.
 description:         Lenses for working with YAML documents.
 license:             BSD3
@@ -22,10 +22,13 @@
                        bytestring,
                        bytestring-lexing >= 0.4.3,
                        containers,
-                       -- Needed to help Cabal's solver:
-                       transformers-compat ==0.4.0.3, 
                        lens >= 4.0 && < 4.10,
                        yaml-light >= 0.1 && < 0.2
+
+  -- Needed to help Cabal's solver:
+  if impl(ghc < 7.10.1)
+    build-depends: transformers-compat ==0.4.0.3
+
   hs-source-dirs:      src
   ghc-options:         -Wall -fno-warn-orphans
   default-language:    Haskell2010
