diff --git a/Data/Ranges.hs b/Data/Ranges.hs
--- a/Data/Ranges.hs
+++ b/Data/Ranges.hs
@@ -1,3 +1,6 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE Safe #-}
+
 -- | This module provides a simpler interface than the 'Data.Range' module, allowing you to work with
 -- multiple ranges at the same time.
 --
@@ -30,6 +33,12 @@
   -- * Data types
   Ranges(..)
 ) where
+
+import Data.Semigroup
+
+#if !MIN_VERSION_base(4,8,0)
+import Control.Applicative
+#endif
 
 import qualified Data.Range as R
 
diff --git a/range.cabal b/range.cabal
--- a/range.cabal
+++ b/range.cabal
@@ -10,7 +10,7 @@
 -- PVP summary:      +-+------- breaking API changes
 --                   | | +----- non-breaking API additions
 --                   | | | +--- code changes with no API change
-version:             0.3.0.1
+version:             0.3.0.2
 
 -- A short (one-line) description of the package.
 synopsis:            An efficient and versatile range library.
@@ -76,7 +76,7 @@
                   , parsec >= 3
 
   if impl(ghc < 8)
-    build-depends: free >= 4.12 && < 5
+    build-depends: free >= 4.12 && < 5, semigroups >= 0.19
   else
     build-depends: free >= 4.12
 
