diff --git a/Changelog.md b/Changelog.md
new file mode 100644
--- /dev/null
+++ b/Changelog.md
@@ -0,0 +1,4 @@
+## 1.25.5
+
+- GHC-8.4 and GHC-8.6 compatibility
+  - Monoids have Semigroup instances
diff --git a/HaXml.cabal b/HaXml.cabal
--- a/HaXml.cabal
+++ b/HaXml.cabal
@@ -1,24 +1,40 @@
-name:		HaXml
-version:	1.25.4
-license:	LGPL
-license-file:	COPYRIGHT
-author:		Malcolm Wallace <Malcolm.Wallace@me.com>
-maintainer:	author
-homepage:	http://projects.haskell.org/HaXml/
-category:	Text, XML
-synopsis:	Utilities for manipulating XML documents
+cabal-version:  >= 1.8
+name:           HaXml
+version:        1.25.5
+
+license:        LGPL
+license-files:  COPYRIGHT, LICENCE-GPL, LICENCE-LGPL
+author:         Malcolm Wallace <Malcolm.Wallace@me.com>
+maintainer:     author
+homepage:       http://projects.haskell.org/HaXml/
+bug-reports:    https://github.com/haskell-infra/hackage-trustees/issues
+category:       Text, XML
+synopsis:       Utilities for manipulating XML documents
 description:
-	Haskell utilities for parsing, filtering, transforming and
-	generating XML documents.
+        This version, 1.25.5 is a Non-Maintainer Upload (NMU). Report issues to the Hackage Trustees issue tracker.
+        .
+        Haskell utilities for parsing, filtering, transforming and
+        generating XML documents.
 build-type:     Simple
-cabal-version:  >=1.8
-extra-source-files:    LICENCE-GPL, LICENCE-LGPL
+extra-source-files: Changelog.md
 
-flag splitBase
-  default: True
-flag bytestringInBase
-  default: False
+tested-with:
+  GHC ==8.6.1
+   || ==8.4.4
+   || ==8.2.2
+   || ==8.0.2
+   || ==7.10.3
+   || ==7.8.4
+   || ==7.6.3
+   || ==7.4.2
+   || ==7.2.2
+   || ==7.0.4
 
+source-repository this
+  type:      git
+  location:  https://github.com/hackage-trustees/malcolm-wallace-universe.git
+  tag:       1.25.5
+
 library
   exposed-modules:
         Text.XML.HaXml,
@@ -67,15 +83,17 @@
     exposed-modules:
         Text.XML.HaXml.Schema.Schema
   hs-source-dirs: src
-  build-depends: polyparse >= 1.10, filepath
-  if flag(splitBase)
-    build-depends: base >= 3 && < 6, pretty, random, containers
-  else
-    build-depends: base < 3
-  if flag(bytestringInBase)
-    build-depends: base >= 2 && < 3
-  else
-    build-depends: base < 2 || >= 3, bytestring
+  build-depends:
+    base       >= 4.3.1.0  && < 4.13,
+    bytestring >= 0.9.1.10 && < 0.11,
+    containers >= 0.4.0.0  && <0.7,
+    filepath   >= 1.2.0.0  && <1.5,
+    pretty     >= 1.0.1.2  && <1.2,
+    random     >= 1.0      && <1.2,
+    polyparse  >= 1.12.1   && <1.13
+  if !impl(ghc >= 8.0)
+    build-depends:
+      semigroups >= 0.18.5  && < 0.19
   extensions: CPP, ExistentialQuantification
   nhc98-options: -K10M
 
diff --git a/src/Text/XML/HaXml/ByteStringPP.hs b/src/Text/XML/HaXml/ByteStringPP.hs
--- a/src/Text/XML/HaXml/ByteStringPP.hs
+++ b/src/Text/XML/HaXml/ByteStringPP.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 -- | This is a fast non-pretty-printer for turning the internal representation
 --   of generic structured XML documents into Lazy ByteStrings.
 --   Like in Text.Xml.HaXml.Pretty, there is one pp function for each type in
@@ -20,7 +21,12 @@
   ,   cp
   ) where
 
+#if MIN_VERSION_base(4,11,0)
+import Prelude hiding (maybe,either,elem,concat,(<>))
+#else
 import Prelude hiding (maybe,either,elem,concat)
+#endif
+
 import Data.Maybe hiding (maybe)
 import Data.List (intersperse)
 --import Data.ByteString.Lazy hiding (pack,map,head,any,singleton,intersperse,join)
diff --git a/src/Text/XML/HaXml/DtdToHaskell/Instance.hs b/src/Text/XML/HaXml/DtdToHaskell/Instance.hs
--- a/src/Text/XML/HaXml/DtdToHaskell/Instance.hs
+++ b/src/Text/XML/HaXml/DtdToHaskell/Instance.hs
@@ -1,6 +1,11 @@
+{-# LANGUAGE CPP #-}
 module Text.XML.HaXml.DtdToHaskell.Instance
   ( mkInstance
   ) where
+
+#if MIN_VERSION_base(4,11,0)
+import Prelude hiding ((<>))
+#endif
 
 import Data.List (intersperse)
 
diff --git a/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs b/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
--- a/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
+++ b/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 -- | Defines an internal representation of Haskell data\/newtype definitions
 --   that correspond to the XML DTD types, and provides pretty-printers to
 --   convert these types into the 'Doc' type of "Text.PrettyPrint.HughesPJ".
@@ -17,6 +18,10 @@
   , Name(..)
   , name, name_, name_a, name_ac, name_f, mangle, manglef
   ) where
+
+#if MIN_VERSION_base(4,11,0)
+import Prelude hiding ((<>))
+#endif
 
 import Data.Char (isLower, isUpper, toLower, toUpper, isDigit)
 import Data.List (intersperse)
diff --git a/src/Text/XML/HaXml/Html/Pretty.hs b/src/Text/XML/HaXml/Html/Pretty.hs
--- a/src/Text/XML/HaXml/Html/Pretty.hs
+++ b/src/Text/XML/HaXml/Html/Pretty.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 -- | This is a separate pretty-printer for HTML documents, recognising
 --   some of the differences between HTML and true XML.
 
@@ -8,7 +9,12 @@
   , content
   ) where
 
+#if MIN_VERSION_base(4,11,0)
+import Prelude hiding (maybe,either,(<>))
+#else
 import Prelude hiding (maybe,either)
+#endif
+
 import Data.Maybe hiding (maybe)
 import Data.List (intersperse)
 import Data.Char (isSpace)
diff --git a/src/Text/XML/HaXml/Pretty.hs b/src/Text/XML/HaXml/Pretty.hs
--- a/src/Text/XML/HaXml/Pretty.hs
+++ b/src/Text/XML/HaXml/Pretty.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 -- | This is a pretty-printer for turning the internal representation
 --   of generic structured XML documents into the Doc type (which can
 --   later be rendered using Text.PrettyPrint.HughesPJ.render).
@@ -21,7 +22,12 @@
   ,   cp
   ) where
 
+#if MIN_VERSION_base(4,11,0)
+import Prelude hiding (maybe,either,(<>))
+#else
 import Prelude hiding (maybe,either)
+#endif
+
 import Data.Maybe hiding (maybe)
 import Data.List (intersperse)
 --import Char (isSpace)
diff --git a/src/Text/XML/HaXml/Schema/PrettyHaskell.hs b/src/Text/XML/HaXml/Schema/PrettyHaskell.hs
--- a/src/Text/XML/HaXml/Schema/PrettyHaskell.hs
+++ b/src/Text/XML/HaXml/Schema/PrettyHaskell.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 -- | Pretty-print the internal Haskell model of XSD datatypes to a real
 --   Haskell module containing type declarations, and instances for parsing
 --   (and printing - though not yet implemented) values of those datatypes
@@ -9,6 +10,10 @@
   , ppHighLevelDecls
   , ppvList
   ) where
+
+#if MIN_VERSION_base(4,11,0)
+import Prelude hiding ((<>))
+#endif
 
 import Text.XML.HaXml.Types (QName(..),Namespace(..))
 import Text.XML.HaXml.Schema.HaskellTypeModel
diff --git a/src/Text/XML/HaXml/Schema/PrettyHsBoot.hs b/src/Text/XML/HaXml/Schema/PrettyHsBoot.hs
--- a/src/Text/XML/HaXml/Schema/PrettyHsBoot.hs
+++ b/src/Text/XML/HaXml/Schema/PrettyHsBoot.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 -- | Pretty-print the internal Haskell model of XSD datatypes to a
 --   Haskell hs-boot module containing only stub type declarations.
 --   This approach is intended to work around issues of mutually recursive
@@ -9,6 +10,10 @@
   , ppHighLevelDecls
   , ppvList
   ) where
+
+#if MIN_VERSION_base(4,11,0)
+import Prelude hiding ((<>))
+#endif
 
 import Text.XML.HaXml.Types (QName(..),Namespace(..))
 import Text.XML.HaXml.Schema.HaskellTypeModel
diff --git a/src/Text/XML/HaXml/Schema/TypeConversion.hs b/src/Text/XML/HaXml/Schema/TypeConversion.hs
--- a/src/Text/XML/HaXml/Schema/TypeConversion.hs
+++ b/src/Text/XML/HaXml/Schema/TypeConversion.hs
@@ -12,10 +12,11 @@
 import Text.XML.HaXml.Schema.Parse (xsd)
 
 import qualified Data.Map as Map
+import Data.Semigroup (Semigroup (..))
 import Data.Map (Map)
 import Data.List (foldl')
 import Data.Maybe (fromMaybe,fromJust,isNothing,isJust)
-import Data.Monoid
+import Data.Monoid (Monoid (..))
 
 -- | Transform a Schema by lifting all locally-defined anonymous types to
 --   the top-level, naming them, and planting a referend at their original
@@ -540,12 +541,15 @@
 
 instance Monoid Occurs where
     mempty = Occurs Nothing Nothing
-    (Occurs Nothing  Nothing)  `mappend` o  = o
-    (Occurs (Just z) Nothing)  `mappend` (Occurs min max)
+    mappend = (<>)
+
+instance Semigroup Occurs where
+    (Occurs Nothing  Nothing)  <> o  = o
+    (Occurs (Just z) Nothing)  <> (Occurs min max)
                                         = Occurs (Just $ maybe z (*z) min) max
-    (Occurs Nothing  (Just x)) `mappend` (Occurs min max)
+    (Occurs Nothing  (Just x)) <> (Occurs min max)
                                         = Occurs min (Just $ maybe x (*x) max)
-    (Occurs (Just z) (Just x)) `mappend` (Occurs min max)
+    (Occurs (Just z) (Just x)) <> (Occurs min max)
                                         = Occurs (Just $ maybe z (*z) min)
                                                  (Just $ maybe x (*x) max)
 
diff --git a/src/Text/XML/HaXml/Schema/XSDTypeModel.hs b/src/Text/XML/HaXml/Schema/XSDTypeModel.hs
--- a/src/Text/XML/HaXml/Schema/XSDTypeModel.hs
+++ b/src/Text/XML/HaXml/Schema/XSDTypeModel.hs
@@ -2,7 +2,8 @@
   ( module Text.XML.HaXml.Schema.XSDTypeModel
   ) where
 
-import Data.Monoid hiding (Any)
+import Data.Semigroup (Semigroup (..))
+import Data.Monoid (Monoid (..))
 import Text.XML.HaXml.Types      (Name,Namespace,QName)
 
 data Schema        = Schema
@@ -56,7 +57,7 @@
                      deriving (Eq,Show)
 
 data Restriction   = RestrictSim1 { restrict_annotation :: Annotation
-                                  , restrict_base       :: Maybe QName 
+                                  , restrict_base       :: Maybe QName
                                   , restrict_r1         :: Restriction1
                                   }
                    | RestrictType { restrict_annotation :: Annotation
@@ -248,8 +249,8 @@
                    | Base64Binary | HexBinary
                    | AnyURI | QName | Notation
                      deriving (Eq,Show)
-               
 
+
 data MyRestriction = Range Occurs
                    | Pattern Regexp
                    | Enumeration [String]
@@ -293,15 +294,21 @@
 
 instance Monoid Annotation where
   mempty = NoAnnotation "Monoid.mempty <Annotation>"
-  (Documentation d) `mappend` (Documentation e) = Documentation (d++"\n"++e)
-  _                 `mappend` (Documentation e) = Documentation e
-  ann               `mappend` _                 = ann          
+  mappend = (<>)
 
--- This instance is pretty unsatisfactory, and is useful only for
+instance Semigroup Annotation where
+  (Documentation d) <> (Documentation e) = Documentation (d++"\n"++e)
+  _                 <> (Documentation e) = Documentation e
+  ann               <> _                 = ann
+
+-- | This instance is pretty unsatisfactory, and is useful only for
 -- building environments involving recursive modules.  The /mappend/
 -- method is left-biased, and the /mempty/ value contains lots of
 -- undefined values.
 instance Monoid Schema where
   mempty        = Schema{ schema_items=[] }
-  s `mappend` t = s{ schema_items = schema_items s ++ schema_items t }
+  mappend       = (<>)
+
+instance Semigroup Schema where
+  s <> t = s{ schema_items = schema_items s ++ schema_items t }
 
diff --git a/src/Text/XML/HaXml/ShowXmlLazy.hs b/src/Text/XML/HaXml/ShowXmlLazy.hs
--- a/src/Text/XML/HaXml/ShowXmlLazy.hs
+++ b/src/Text/XML/HaXml/ShowXmlLazy.hs
@@ -1,11 +1,17 @@
+{-# LANGUAGE CPP #-}
 module Text.XML.HaXml.ShowXmlLazy (showXmlLazy) where
 
 import Text.XML.HaXml.Types
 import Text.XML.HaXml.Namespaces
 import Text.XML.HaXml.TypeMapping -- (toHType, toDTD, Tuple(), Defined, showHType)
 
-import qualified Text.XML.HaXml.XmlContent as X
+#if MIN_VERSION_base(4,11,0)
+import Prelude hiding (maybe,either,(<>))
+#else
 import Prelude hiding (maybe,either)
+#endif
+
+import qualified Text.XML.HaXml.XmlContent as X
 import Data.Maybe hiding (maybe)
 import Data.List
 
