diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
--- a/Setup.hs
+++ /dev/null
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff --git a/Util/BinaryInstances.hs b/Util/BinaryInstances.hs
--- a/Util/BinaryInstances.hs
+++ b/Util/BinaryInstances.hs
@@ -35,6 +35,7 @@
 import Data.Char
 
 -- GHC modules
+import Control.Monad.Fail
 import Data.Bits
 import Data.Word
 import GHC.Int(Int32)
@@ -159,7 +160,7 @@
          case switch of
             0 -> return False
             1 -> return True
-            _ -> fail ("BinaryInstances.Bool - unexpected switch "
+            _ -> error ("BinaryInstances.Bool - unexpected switch "
                ++ show switch)
 
 
@@ -438,7 +439,7 @@
                 do
                    v <- readBin rb
                    return (Choice5 v)
-            _ -> fail ("BinaryInstances.Choice5 - unexpected switch "
+            _ -> error ("BinaryInstances.Choice5 - unexpected switch "
                ++ show switch)
 
 -- ----------------------------------------------------------------------
@@ -538,7 +539,7 @@
                )
             (wraps :: [Wrap wrapper m]) of
 
-            Nothing -> fail ("BinaryInstances.Wrapper - bad switch "
+            Nothing -> error ("BinaryInstances.Wrapper - bad switch "
                ++ show thisLabel)
             Just (getWrap :: m (Wrapped wrapper)) -> getWrap
 
diff --git a/Util/BinaryUtils.hs b/Util/BinaryUtils.hs
--- a/Util/BinaryUtils.hs
+++ b/Util/BinaryUtils.hs
@@ -69,6 +69,7 @@
 
 -- GHC imports
 import Control.Applicative
+import Control.Monad.Fail
 import Control.Monad.Trans
 
 -- our imports
@@ -166,7 +167,8 @@
 
    return v = ArgMonad (const (return v))
 
-   fail s = ArgMonad (const (fail s))
+instance MonadFail m => MonadFail (ArgMonad arg m) where
+   fail s = ArgMonad (const (Control.Monad.Fail.fail s))
 
 instance MonadIO m => MonadIO (ArgMonad arg m) where
    liftIO act = ArgMonad (\ arg -> liftIO act)
diff --git a/Util/Computation.hs b/Util/Computation.hs
--- a/Util/Computation.hs
+++ b/Util/Computation.hs
@@ -107,6 +107,7 @@
 
 import Control.Applicative
 import Control.Monad
+import Control.Monad.Fail
 
 import Control.Exception
 
@@ -310,6 +311,8 @@
    return v = hasValue v
    (>>=) aWE toBWe =
       mapWithError' toBWe aWE
+
+instance MonadFail WithError where
    fail s = hasError s
 
 newtype MonadWithError m a = MonadWithError (m (WithError a))
@@ -335,6 +338,7 @@
                      act2
                Error s -> return (Error s)
          )
+instance MonadFail m => MonadFail (MonadWithError m) where
    fail s = MonadWithError (return (Error s))
 
 monadifyWithError :: Monad m => WithError a -> MonadWithError m a
diff --git a/Util/UTF8.hs b/Util/UTF8.hs
--- a/Util/UTF8.hs
+++ b/Util/UTF8.hs
@@ -23,6 +23,7 @@
 import Data.Bits
 import Data.Word
 import Control.Monad.Except () -- needed for instance Monad (Either String)
+import Control.Monad.Fail
 
 import Util.Computation
 
@@ -76,7 +77,7 @@
 -- (fromUTF8WE :: String -> Either String String)
 -- to get a conversion function which either succeeds (Right) or
 -- returns an error message (Left).
-fromUTF8WE :: (Enum byte,Monad m) => [byte] -> m String
+fromUTF8WE :: (Enum byte,MonadFail m) => [byte] -> m String
 fromUTF8WE [] = return []
 fromUTF8WE (x0 : xs0) =
    let
@@ -88,11 +89,11 @@
                xs1 <- fromUTF8WE xs0
                return (chr ox : xs1)
          6 ->
-            fail "UTF8 escape sequence starts 10xxxxxx"
+            Control.Monad.Fail.fail "UTF8 escape sequence starts 10xxxxxx"
          0 ->
-            fail "UTF8 escape sequence starts 11111110"
+            Control.Monad.Fail.fail "UTF8 escape sequence starts 11111110"
          -1 ->
-            fail "UTF8 escape sequence starts 11111111"
+            Control.Monad.Fail.fail "UTF8 escape sequence starts 11111111"
          n ->
             let
                r = 6 - n -- number of 6-bit pieces
@@ -108,14 +109,14 @@
                      )
 
                mkx [] _ _ =
-                  fail "UTF8 string ends in middle of escape sequence"
+                  Control.Monad.Fail.fail "UTF8 string ends in middle of escape sequence"
                mkx (ch : xs1) x0 count0 =
                   do
                      let
                         och = fromEnum ch
                      if och .&. 0x80 /= 0x80
                         then
-                           fail ("UTF8 escape sequence contains continuing "
+                           Control.Monad.Fail.fail ("UTF8 escape sequence contains continuing "
                               ++ "character not of form 10xxxxxx")
                         else
                            return ()
@@ -133,7 +134,7 @@
                   (x,xs1) <- mkx xs0 xtop r
                   if x < minx
                      then
-                        fail ("UTF8 escape sequence contains character not "
+                        Control.Monad.Fail.fail ("UTF8 escape sequence contains character not "
                            ++ "optimally encoded")
                      else
                         do
@@ -142,8 +143,6 @@
 
 {-# SPECIALIZE fromUTF8WE :: String -> WithError String #-}
 {-# SPECIALIZE fromUTF8WE :: [Word8] -> WithError String #-}
-{-# SPECIALIZE fromUTF8WE :: String -> Either String String #-}
-{-# SPECIALIZE fromUTF8WE :: [Word8] -> Either String String #-}
 
 
 -- --------------------------------------------------------------------------
diff --git a/uni-util.cabal b/uni-util.cabal
--- a/uni-util.cabal
+++ b/uni-util.cabal
@@ -1,5 +1,5 @@
 name:           uni-util
-version:        2.3.0.2
+version:        2.3.0.3
 build-type:     Simple
 license:        LGPL
 license-file:   LICENSE
@@ -13,9 +13,9 @@
  old HTk- und uDrawGraph bindings as well as for the MMiSS Workbench.
  They are kept for compatibility reason and put on hackage to ease
  installation.
-cabal-version:  >= 1.4
-Tested-With:    GHC==7.10.3, GHC==8.2.2, GHC==8.4.3
-                
+cabal-version:  >= 1.10
+Tested-With:    GHC==8.6.5, GHC==8.8.4
+
 extra-source-files: include/new_object.h include/default_options.h
 
 flag base4
@@ -50,7 +50,7 @@
  c-sources: new_object.c, default_options.c
 
  build-depends: base >= 4 && < 5, mtl, directory,
-  network, containers, bytestring, array, old-time
+  network, network-bsd, containers, bytestring, array, old-time
 
  if flag(base4)
    build-depends: ghc-prim
@@ -65,3 +65,5 @@
 
  if os(windows)
    cpp-options: -DWINDOWS
+
+ default-language: Haskell2010
