diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2014 Simon Hengel <sol@typeful.net>
+Copyright (c) 2011-2018 Simon Hengel <sol@typeful.net>
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/src/Data/String/Builder.hs b/src/Data/String/Builder.hs
--- a/src/Data/String/Builder.hs
+++ b/src/Data/String/Builder.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveFunctor, TypeSynonymInstances, FlexibleInstances, TypeFamilies #-}
+{-# LANGUAGE CPP, DeriveFunctor, TypeSynonymInstances, FlexibleInstances, TypeFamilies #-}
 -- |
 -- The `build` function can be used to construct multi-line string literals in
 -- a monadic way:
@@ -43,7 +43,12 @@
 
 instance Monoid Builder where
   mempty = return ()
-  a `mappend` b = a >> b
+#if !MIN_VERSION_base(4,11,0)
+  mappend = (>>)
+#else
+instance Semigroup Builder where
+  (<>) = (>>)
+#endif
 
 -- | Add a literal string.
 literal :: String -> Builder
diff --git a/stringbuilder.cabal b/stringbuilder.cabal
--- a/stringbuilder.cabal
+++ b/stringbuilder.cabal
@@ -1,11 +1,11 @@
 name:             stringbuilder
-version:          0.5.0
+version:          0.5.1
 synopsis:         A writer monad for multi-line string literals
 description:      <https://github.com/sol/stringbuilder#readme>
 category:         Testing
 license:          MIT
 license-file:     LICENSE
-copyright:        (c) 2011-2014 Simon Hengel
+copyright:        (c) 2011-2018 Simon Hengel
 author:           Simon Hengel <sol@typeful.net>
 maintainer:       Simon Hengel <sol@typeful.net>
 build-type:       Simple
@@ -31,7 +31,7 @@
   main-is:
       Spec.hs
   ghc-options:
-      -Wall -Werror
+      -Wall
   hs-source-dirs:
       test
   build-depends:
