diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 import Distribution.Simple
 import Distribution.Simple.Setup
 import Distribution.Simple.Haddock
@@ -8,7 +9,16 @@
         haddockHtml         = Flag True,
         haddockProgramArgs  = [("-q",["aliased"])], -- does not seam to do anything
         haddockExecutables  = Flag True,
+#   if defined(MIN_VERSION_Cabal)
+#     if MIN_VERSION_Cabal(2, 2, 0)
+        haddockLinkedSource = Flag True
+#     else
         haddockHscolour     = Flag True
+#     endif
+#   else
+        -- Almost certainly Cabal 1.22 or older
+        haddockHscolour     = Flag True
+#   endif
         }
     }
 
diff --git a/blazeT.cabal b/blazeT.cabal
--- a/blazeT.cabal
+++ b/blazeT.cabal
@@ -1,6 +1,5 @@
 Name:             blazeT
-Version:          0.0.5
-Homepage:
+Version:          0.0.6
 Bug-Reports:      http://github.com/johannesgerer/blazeT/issues
 License:          MIT
 License-file:     LICENSE
@@ -19,7 +18,7 @@
 
 
 Build-type:    Custom
-Cabal-version: >= 1.8
+Cabal-version: >= 1.10
 
 Extra-source-files:
   README.md
@@ -28,10 +27,10 @@
   src/Util/GenerateHtmlTCombinators.hs
 
 Custom-setup
-  setup-depends:  base >= 4.0.0.0 && < 5, Cabal
+  setup-depends:  base >= 4.0.0.0 && < 5, Cabal < 4
 
 Library
-  -- Default-Language: Haskell2010              
+  Default-Language: Haskell2010
   Hs-source-dirs: src
   Ghc-Options:    -Wall
                   -fsimpl-tick-factor=200
diff --git a/src/Text/BlazeT/Html.hs b/src/Text/BlazeT/Html.hs
--- a/src/Text/BlazeT/Html.hs
+++ b/src/Text/BlazeT/Html.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE MonoLocalBinds #-}
 {-# LANGUAGE RankNTypes #-}
 module Text.BlazeT.Html
     (
diff --git a/src/Text/BlazeT/Internal.hs b/src/Text/BlazeT/Internal.hs
--- a/src/Text/BlazeT/Internal.hs
+++ b/src/Text/BlazeT/Internal.hs
@@ -189,11 +189,42 @@
 {-# INLINE wrapMarkup2 #-}
 
 
+mappendMarkupT
+#if defined(MIN_VERSION_base)
+#  if MIN_VERSION_base(4, 11, 0)
+  :: (Monad m, Semigroup a)
+#  else
+  :: (Monad m, Monoid a)
+#  endif
+#else
+  -- Almost certainly GHC < 8, which corresponds to `base` w/o Semigroup
+  :: (Monad m, Monoid a)
+#endif
+  => MarkupT m a
+  -> MarkupT m a
+  -> MarkupT m a
+a `mappendMarkupT` b = do {a' <- a; b >>= return . (a' <>)}
+
+#if defined(MIN_VERSION_base)
+#  if MIN_VERSION_base(4, 11, 0)
+instance (Monad m,Semigroup a) => Semigroup (MarkupT m a) where
+  (<>) = mappendMarkupT
+  {-# INLINE (<>) #-}
+#  else
 instance (Monad m,Monoid a) => Monoid (MarkupT m a) where
   mempty = return mempty
   {-# INLINE mempty #-}
-  a `mappend` b = do {a' <- a; b >>= return . (mappend a')}
+  mappend = mappendMarkupT
   {-# INLINE mappend #-}
+#  endif
+#else
+  -- Almost certainly GHC < 8, which corresponds to `base` w/o Semigroup
+instance (Monad m,Monoid a) => Monoid (MarkupT m a) where
+  mempty = return mempty
+  {-# INLINE mempty #-}
+  mappend = mappendMarkupT
+  {-# INLINE mappend #-}
+#endif
 
 
 instance Monad m => Text.Blaze.Attributable (MarkupT m a) where
