diff --git a/shake-ext.cabal b/shake-ext.cabal
--- a/shake-ext.cabal
+++ b/shake-ext.cabal
@@ -1,5 +1,5 @@
 name:                shake-ext
-version:             2.4.0.1
+version:             2.5.0.0
 synopsis:            Helper functions for linting with shake 
 description:         This package provides several linters out of the box, for use with [shake](http://shakebuild.com/).
 homepage:            https://hub.darcs.net/vmchale/shake-ext
diff --git a/src/Development/Shake/C.hs b/src/Development/Shake/C.hs
--- a/src/Development/Shake/C.hs
+++ b/src/Development/Shake/C.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP             #-}
 {-# LANGUAGE PatternSynonyms #-}
 
 module Development.Shake.C ( -- * Types
@@ -21,7 +22,9 @@
 
 import           Control.Monad
 import           Data.List                  (isSuffixOf)
+#if __GLASGOW_HASKELL__ < 804
 import           Data.Semigroup
+#endif
 import           Development.Shake
 import           Development.Shake.FilePath
 import           System.Info
@@ -87,7 +90,7 @@
     mconcat [ foldr (>>) (pure ()) objRules
             , staticLibR cc (g sources) lib cfg
             ]
-    where objRules = objectFileR cc <$> g sources <*> pure lib <*> pure cfg
+    where objRules = objectFileR cc cfg <$> g sources <*> pure lib
           g = fmap (-<.> "o")
 
 cBin :: CCompiler
@@ -121,11 +124,11 @@
         command mempty (ccToString cc) ("-shared" : "-o" : out : objFiles <> cconfigToArgs cfg)
 
 objectFileR :: CCompiler
+            -> CConfig
             -> FilePath -- ^ C source file
             -> FilePattern -- ^ Object file output
-            -> CConfig
             -> Rules ()
-objectFileR cc srcFile objFile cfg =
+objectFileR cc cfg srcFile objFile =
     objFile %> \out ->
         need [srcFile] >>
         command mempty (ccToString cc) (srcFile : "-c" : "-fPIC" : "-o" : out : cconfigToArgs cfg)
diff --git a/src/Development/Shake/Cabal.hs b/src/Development/Shake/Cabal.hs
--- a/src/Development/Shake/Cabal.hs
+++ b/src/Development/Shake/Cabal.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
 module Development.Shake.Cabal ( getCabalDeps
                                , getCabalDepsV
                                ) where
@@ -6,7 +8,9 @@
 import           Control.Monad
 import           Data.Foldable                         (toList)
 import           Data.Maybe                            (catMaybes)
+#if __GLASGOW_HASKELL__ < 804
 import           Data.Semigroup
+#endif
 import           Distribution.ModuleName
 import           Distribution.PackageDescription
 import           Distribution.PackageDescription.Parse
