diff --git a/Data/Set/Extra.hs b/Data/Set/Extra.hs
--- a/Data/Set/Extra.hs
+++ b/Data/Set/Extra.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
 module Data.Set.Extra
     ( module Set
     , mapM
@@ -99,8 +101,10 @@
 distrib :: Ord a => Set (Set a) -> Set (Set a) -> Set (Set a)
 distrib lss rss = flatten $ map (\ rs -> (map (\ ls -> union rs ls) lss)) rss
 
+#if !MIN_VERSION_containers(0,5,11)
 cartesianProduct :: (Ord a, Ord b) => Set a -> Set b -> Set (a, b)
 cartesianProduct xs ys = flatten $ Set.map (\ x -> Set.map (\ y -> (x, y)) ys) xs
+#endif
 
 groupBy :: (Ord a, Ord b) => (a -> b) -> Set a -> Map.Map b (Set a)
 groupBy f xs = fold (\ x m -> Map.insertWith union (f x) (singleton x) m) Map.empty xs
diff --git a/set-extra.cabal b/set-extra.cabal
--- a/set-extra.cabal
+++ b/set-extra.cabal
@@ -1,5 +1,5 @@
 Name:           set-extra
-Version:        1.4
+Version:        1.4.1
 License:        BSD3
 License-File:	COPYING
 Author:         David Fox
@@ -8,7 +8,10 @@
 Synopsis:       Functions that could be added to Data.Set.
 Maintainer:     David Fox <dsf@seereason.com>
 Homepage:       https://github.com/ddssff/set-extra
-ghc-options:	-O2 -Wall
-Exposed-modules: Data.Set.Extra, Data.Set.ExtraG
-Build-Depends: base < 5, containers, mtl, syb
-Build-Type: Simple
+Build-Type:     Simple
+cabal-version:  >= 1.2
+
+Library
+  ghc-options:	-O2 -Wall
+  Exposed-modules: Data.Set.Extra, Data.Set.ExtraG
+  Build-Depends: base < 5, containers, mtl, syb
