diff --git a/ordinal.cabal b/ordinal.cabal
--- a/ordinal.cabal
+++ b/ordinal.cabal
@@ -1,5 +1,5 @@
 name:                ordinal
-version:             0.4.0.3
+version:             0.4.0.4
 synopsis:            Convert numbers to words in different languages.
 description:
     A package based on Python's num2words package that converts numbers
diff --git a/src/Text/Numerals/Algorithm.hs b/src/Text/Numerals/Algorithm.hs
--- a/src/Text/Numerals/Algorithm.hs
+++ b/src/Text/Numerals/Algorithm.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedStrings, RankNTypes, TupleSections #-}
+{-# LANGUAGE CPP, OverloadedStrings, RankNTypes, TupleSections #-}
 
 {-|
 Module      : Text.Numerals.Algorithm
@@ -30,6 +30,9 @@
 import Data.Default(Default(def))
 import Data.Foldable(toList)
 import Data.List(sortOn)
+#if __GLASGOW_HASKELL__ < 803
+import Data.Semigroup((<>))
+#endif
 import Data.Text(Text, cons, toTitle)
 import Data.Vector(Vector, (!), (!?), fromList)
 import qualified Data.Vector as V
diff --git a/src/Text/Numerals/Algorithm/Template.hs b/src/Text/Numerals/Algorithm/Template.hs
--- a/src/Text/Numerals/Algorithm/Template.hs
+++ b/src/Text/Numerals/Algorithm/Template.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TemplateHaskellQuotes #-}
+{-# LANGUAGE CPP, TemplateHaskellQuotes #-}
 
 {-|
 Module      : Text.Numerals.Algorithm.Template
@@ -16,6 +16,9 @@
   ) where
 
 import Data.Map.Strict(Map, elems, fromListWith)
+#if __GLASGOW_HASKELL__ < 803
+import Data.Semigroup((<>))
+#endif
 import Data.Text(Text, isSuffixOf, pack, snoc)
 
 import Text.Numerals.Internal(_replaceSuffix)
diff --git a/src/Text/Numerals/Languages/Dutch.hs b/src/Text/Numerals/Languages/Dutch.hs
--- a/src/Text/Numerals/Languages/Dutch.hs
+++ b/src/Text/Numerals/Languages/Dutch.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedLists, OverloadedStrings, TemplateHaskell #-}
+{-# LANGUAGE CPP, OverloadedLists, OverloadedStrings, TemplateHaskell #-}
 
 {-|
 Module      : Text.Numerals.Languages.Dutch
@@ -25,6 +25,9 @@
   , merge'
   ) where
 
+#if __GLASGOW_HASKELL__ < 803
+import Data.Semigroup((<>))
+#endif
 import Data.Text(Text, pack, snoc)
 import Data.Vector(Vector)
 
diff --git a/src/Text/Numerals/Languages/English.hs b/src/Text/Numerals/Languages/English.hs
--- a/src/Text/Numerals/Languages/English.hs
+++ b/src/Text/Numerals/Languages/English.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedLists, OverloadedStrings, TemplateHaskell #-}
+{-# LANGUAGE CPP, OverloadedLists, OverloadedStrings, TemplateHaskell #-}
 
 {-|
 Module      : Text.Numerals.Languages.English
@@ -26,6 +26,9 @@
   ) where
 
 import Data.Default(def)
+#if __GLASGOW_HASKELL__ < 803
+import Data.Semigroup((<>))
+#endif
 import Data.Text(Text, isSuffixOf, pack)
 import qualified Data.Text as T
 import Data.Vector(Vector)
diff --git a/src/Text/Numerals/Languages/French.hs b/src/Text/Numerals/Languages/French.hs
--- a/src/Text/Numerals/Languages/French.hs
+++ b/src/Text/Numerals/Languages/French.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedLists, OverloadedStrings, TemplateHaskell #-}
+{-# LANGUAGE CPP, OverloadedLists, OverloadedStrings, TemplateHaskell #-}
 
 {-|
 Module      : Text.Numerals.Languages.French
@@ -25,6 +25,9 @@
   , merge'
   ) where
 
+#if __GLASGOW_HASKELL__ < 803
+import Data.Semigroup((<>))
+#endif
 import Data.Text(Text, isSuffixOf, pack, snoc)
 import Data.Vector(Vector)
 
diff --git a/src/Text/Numerals/Languages/German.hs b/src/Text/Numerals/Languages/German.hs
--- a/src/Text/Numerals/Languages/German.hs
+++ b/src/Text/Numerals/Languages/German.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedLists, OverloadedStrings, QuasiQuotes, TemplateHaskell #-}
+{-# LANGUAGE CPP, OverloadedLists, OverloadedStrings, QuasiQuotes, TemplateHaskell #-}
 
 {-|
 Module      : Text.Numerals.Languages.German
@@ -26,6 +26,9 @@
   ) where
 
 import Data.Bool(bool)
+#if __GLASGOW_HASKELL__ < 803
+import Data.Semigroup((<>))
+#endif
 import Data.Text(Text, isSuffixOf, pack, toLower, toTitle)
 import Data.Vector(Vector)
 
