diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-27  Sergey Vinokurov  <serg.foo@gmail.com>
+
+	* 0.4.5.2: Fix build for 8.8.1
+
 2019-01-06  Sergey Vinokurov  <serg.foo@gmail.com>
 
 	* 0.4.5.1: Fix benchmark build when dependency on AttoBencode is switched off
diff --git a/bencoding.cabal b/bencoding.cabal
--- a/bencoding.cabal
+++ b/bencoding.cabal
@@ -1,5 +1,5 @@
 name:                  bencoding
-version:               0.4.5.1
+version:               0.4.5.2
 license:               BSD3
 license-file:          LICENSE
 author:                Sam Truzjan
@@ -10,7 +10,7 @@
 build-type:            Simple
 stability:             Experimental
 cabal-version:         >= 1.10
-tested-with:           GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.3
+tested-with:           GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1
 homepage:              https://github.com/sergv/bencoding
 bug-reports:           https://github.com/sergv/bencoding/issues
 synopsis:              A library for encoding and decoding of BEncode data.
diff --git a/src/Data/BEncode.hs b/src/Data/BEncode.hs
--- a/src/Data/BEncode.hs
+++ b/src/Data/BEncode.hs
@@ -103,7 +103,9 @@
 #endif
 import Data.Int
 import Data.List as L
+#if __GLASGOW_HASKELL__ < 808
 import Data.Semigroup ((<>))
+#endif
 import Data.Word          (Word8, Word16, Word32, Word64)
 import           Data.ByteString (ByteString)
 import qualified Data.ByteString.Char8 as BC
@@ -679,8 +681,14 @@
   Get m >> Get n = Get (m >> n)
   {-# INLINE (>>) #-}
 
+#if __GLASGOW_HASKELL__ < 808
   fail msg = Get (lift (Left msg))
   {-# INLINE fail #-}
+#else
+instance MonadFail Get where
+  fail msg = Get (lift (Left msg))
+  {-# INLINE fail #-}
+#endif
 
 -- | Run action, but return without consuming and key\/value pair.
 -- Fails if the action fails.
diff --git a/src/Data/BEncode/BDict.hs b/src/Data/BEncode/BDict.hs
--- a/src/Data/BEncode/BDict.hs
+++ b/src/Data/BEncode/BDict.hs
@@ -48,7 +48,9 @@
 import Data.Foldable
 import Data.Monoid (Monoid (mappend, mempty))
 #endif
+#if __GLASGOW_HASKELL__ < 808
 import Data.Semigroup (Semigroup ((<>)))
+#endif
 import GHC.Generics (Generic)
 
 type BKey = ByteString
