diff --git a/specs/Data/Text/ICU/ReplaceSpec.hs b/specs/Data/Text/ICU/ReplaceSpec.hs
--- a/specs/Data/Text/ICU/ReplaceSpec.hs
+++ b/specs/Data/Text/ICU/ReplaceSpec.hs
@@ -4,11 +4,7 @@
 module Data.Text.ICU.ReplaceSpec where
 
 
-import qualified Data.Text              as T
-import           Data.Text.ICU
-import qualified Data.Text.ICU          as ICU
 import           Data.Text.ICU.Replace
-import           Data.Text.Lazy.Builder
 
 import           Test.Hspec
 
diff --git a/src/Data/Text/ICU/Replace.hs b/src/Data/Text/ICU/Replace.hs
--- a/src/Data/Text/ICU/Replace.hs
+++ b/src/Data/Text/ICU/Replace.hs
@@ -1,6 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE OverloadedStrings          #-}
 {-# LANGUAGE TupleSections              #-}
+{-# LANGUAGE CPP              #-}
 
 {-|
 
@@ -37,9 +38,11 @@
 
 
 import           Control.Applicative
-import           Control.Arrow
 import           Data.Attoparsec.Text
 import           Data.Foldable
+#if __GLASGOW_HASKELL__ < 804
+import           Data.Semigroup (Semigroup)
+#endif
 import           Data.Monoid
 import           Data.String
 import qualified Data.Text              as T
@@ -51,6 +54,7 @@
 import           Prelude                hiding (span)
 
 
+
 -- | A 'Replace' instance is a function from a regular expression match to
 -- a 'Data.Text.Lazy.Builder.Builder'. This naturally forms a 'Monoid', so
 -- they're easy to combine.
@@ -58,7 +62,11 @@
 -- 'Replace' also implements 'IsString', so raw strings can be used to
 -- construct them.
 newtype Replace = Replace { unReplace :: Match -> TB.Builder } deriving
-                  (Monoid)
+                  ( Monoid
+#if __GLASGOW_HASKELL__ < 804
+                  , Semigroup
+#endif
+                  )
 
 instance IsString Replace where
     fromString = parseReplace . T.pack
@@ -102,7 +110,7 @@
         step :: (Last MatchState, TB.Builder)
              -> Match
              -> (Last MatchState, TB.Builder)
-        step lstep@(Last prev, buffer) m =
+        step (Last prev, buffer) m =
             let s      = span m
                 g      = fold $ group 0 m
                 offset = (+ T.length s) . (+ T.length g) $ maybe 0 snd prev
diff --git a/text-regex-replace.cabal b/text-regex-replace.cabal
--- a/text-regex-replace.cabal
+++ b/text-regex-replace.cabal
@@ -1,57 +1,53 @@
--- Initial text-regex-replace.cabal generated by cabal init.  For further 
--- documentation, see http://haskell.org/cabal/users-guide/
-
-name:                text-regex-replace
-version:             0.1.1.1
-synopsis:            Easy replacement when using text-icu regexes.
+name: text-regex-replace
+version: 0.1.1.2
+cabal-version: >=1.10
+build-type: Simple
+license: Apache-2.0
+license-file: LICENSE
+maintainer: erochest@gmail.com
+synopsis: Easy replacement when using text-icu regexes.
 description:
-  This provides a convenient API for doing replacements off of a regular
-  expression, similar to what regex libraries in other languages provide.
-  .
-  At this point, this hasn't been used enough to have any idea of its
-  performance. Caveat emptor.
-license:             Apache-2.0
-license-file:        LICENSE
-author:              Eric Rochester
-maintainer:          erochest@gmail.com
--- copyright:           
-category:            Data, Text
-build-type:          Simple
--- extra-source-files:  
-cabal-version:       >=1.10
-
-library
-  exposed-modules:     Data.Text.ICU.Replace
-  -- other-modules:       
-  -- other-extensions:    
-  build-depends:       base       >= 4.7  && <5
-                     , attoparsec >= 0.12 && <0.14
-                     , text       >= 1.2  && <1.3
-                     , text-icu   >= 0.7  && <0.8
-  hs-source-dirs:      src
-  default-language:    Haskell2010
-
-test-suite text-regex-replace-specs
-  type:                exitcode-stdio-1.0
-  ghc-options:         -threaded -rtsopts
-  hs-source-dirs:      specs
-  main-is:             Specs.hs
-  other-modules:       Data.Text.ICU.ReplaceSpec
-  build-depends:         base
-                       , text-regex-replace
-                       , QuickCheck
-                       , smallcheck
-                       , hspec
-                       , text       >= 1.2  && <1.3
-                       , text-icu   >= 0.7  && <0.8
-  default-language:    Haskell2010
-
+    This provides a convenient API for doing replacements off of a regular
+    expression, similar to what regex libraries in other languages provide.
+    .
+    At this point, this hasn't been used enough to have any idea of its
+    performance. Caveat emptor.
+category: Data, Text
+author: Eric Rochester
 
 source-repository head
-  type:                git
-  location:            git://github.com/erochest/text-regex-replace.git
+    type: git
+    location: git://github.com/erochest/text-regex-replace.git
 
 source-repository this
-  type:                git
-  tag:                 0.1.0.1
-  location:            git://github.com/erochest/text-regex-replace.git
+    type: git
+    location: git://github.com/erochest/text-regex-replace.git
+    tag: 0.1.0.1
+
+library
+    exposed-modules:
+        Data.Text.ICU.Replace
+    build-depends:
+        base >=4.7 && <5,
+        attoparsec >=0.12 && <0.14,
+        text ==1.2.*,
+        text-icu ==0.7.*
+    default-language: Haskell2010
+    hs-source-dirs: src
+
+test-suite  text-regex-replace-specs
+    type: exitcode-stdio-1.0
+    main-is: Specs.hs
+    build-depends:
+        base >=4.10.1.0,
+        text-regex-replace -any,
+        QuickCheck >=2.10.1,
+        smallcheck >=1.1.3.1,
+        hspec >=2.4.8,
+        text ==1.2.*,
+        text-icu ==0.7.*
+    default-language: Haskell2010
+    hs-source-dirs: specs
+    other-modules:
+        Data.Text.ICU.ReplaceSpec
+    ghc-options: -threaded -rtsopts
