diff --git a/Control/Concurrent/Chan/Lifted.hs b/Control/Concurrent/Chan/Lifted.hs
--- a/Control/Concurrent/Chan/Lifted.hs
+++ b/Control/Concurrent/Chan/Lifted.hs
@@ -3,7 +3,7 @@
 {-# LANGUAGE FlexibleContexts #-}
 
 #if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 
 {- |
diff --git a/Control/Concurrent/Lifted.hs b/Control/Concurrent/Lifted.hs
--- a/Control/Concurrent/Lifted.hs
+++ b/Control/Concurrent/Lifted.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE CPP, NoImplicitPrelude, FlexibleContexts, RankNTypes #-}
 
 #if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 
 {- |
diff --git a/Control/Concurrent/MVar/Lifted.hs b/Control/Concurrent/MVar/Lifted.hs
--- a/Control/Concurrent/MVar/Lifted.hs
+++ b/Control/Concurrent/MVar/Lifted.hs
@@ -4,7 +4,7 @@
            , TupleSections #-}
 
 #if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 
 {- |
diff --git a/Control/Concurrent/QSem/Lifted.hs b/Control/Concurrent/QSem/Lifted.hs
--- a/Control/Concurrent/QSem/Lifted.hs
+++ b/Control/Concurrent/QSem/Lifted.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE FlexibleContexts #-}
 
 #if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 
 {- |
diff --git a/Control/Concurrent/QSemN/Lifted.hs b/Control/Concurrent/QSemN/Lifted.hs
--- a/Control/Concurrent/QSemN/Lifted.hs
+++ b/Control/Concurrent/QSemN/Lifted.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE FlexibleContexts #-}
 
 #if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 
 {- |
diff --git a/Control/Exception/Lifted.hs b/Control/Exception/Lifted.hs
--- a/Control/Exception/Lifted.hs
+++ b/Control/Exception/Lifted.hs
@@ -1,15 +1,14 @@
 {-# LANGUAGE CPP
            , NoImplicitPrelude
            , ExistentialQuantification
-           , FlexibleContexts
-           , ImpredicativeTypes #-}
+           , FlexibleContexts #-}
 
 #if MIN_VERSION_base(4,3,0)
 {-# LANGUAGE RankNTypes #-} -- for mask
 #endif
 
 #if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 
 {- |
@@ -125,7 +124,7 @@
                                    , liftBaseWith, restoreM
                                    , control, liftBaseOp_
                                    )
-#if MIN_VERSION_base(4,3,0) || defined (__HADDOCK__)
+#if defined (__HADDOCK__)
 import Control.Monad.Trans.Control ( liftBaseOp )
 #endif
 
@@ -265,23 +264,22 @@
 #if MIN_VERSION_base(4,3,0)
 -- |Generalized version of 'E.mask'.
 mask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b
-mask = liftBaseOp E.mask . liftRestore
+mask f = control $ \runInBase ->
+           E.mask $ \g -> runInBase $ f $ liftBaseOp_ g
 {-# INLINABLE mask #-}
 
-liftRestore :: MonadBaseControl IO m
-            => ((forall a.  m a ->  m a) -> b)
-            -> ((forall a. IO a -> IO a) -> b)
-liftRestore f r = f $ liftBaseOp_ r
-{-# INLINE liftRestore #-}
-
 -- |Generalized version of 'E.mask_'.
 mask_ :: MonadBaseControl IO m => m a -> m a
 mask_ = liftBaseOp_ E.mask_
 {-# INLINABLE mask_ #-}
 
 -- |Generalized version of 'E.uninterruptibleMask'.
-uninterruptibleMask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b
-uninterruptibleMask = liftBaseOp E.uninterruptibleMask . liftRestore
+uninterruptibleMask
+    :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b
+uninterruptibleMask f =
+    control $ \runInBase ->
+        E.uninterruptibleMask $ \g -> runInBase $ f $ liftBaseOp_ g
+
 {-# INLINABLE uninterruptibleMask #-}
 
 -- |Generalized version of 'E.uninterruptibleMask_'.
diff --git a/Data/IORef/Lifted.hs b/Data/IORef/Lifted.hs
--- a/Data/IORef/Lifted.hs
+++ b/Data/IORef/Lifted.hs
@@ -2,8 +2,8 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 {-# LANGUAGE FlexibleContexts #-}
 
-#if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
+#if __GLASGOW_HASKELL__ >= 704
+{-# LANGUAGE Safe #-}
 #endif
 
 {- |
diff --git a/Foreign/Marshal/Utils/Lifted.hs b/Foreign/Marshal/Utils/Lifted.hs
--- a/Foreign/Marshal/Utils/Lifted.hs
+++ b/Foreign/Marshal/Utils/Lifted.hs
@@ -2,7 +2,9 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 {-# LANGUAGE FlexibleContexts #-}
 
-#if __GLASGOW_HASKELL__ >= 702
+#if __GLASGOW_HASKELL__ >= 710
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 702
 {-# LANGUAGE Trustworthy #-}
 #endif
 
diff --git a/README.markdown b/README.markdown
--- a/README.markdown
+++ b/README.markdown
@@ -1,3 +1,6 @@
+[![Hackage](https://img.shields.io/hackage/v/lifted-base.svg)](https://hackage.haskell.org/package/lifted-base)
+[![Build Status](https://travis-ci.org/basvandijk/lifted-base.svg)](https://travis-ci.org/basvandijk/lifted-base)
+
 IO operations from the base library lifted to any instance of
 `MonadBase` or `MonadBaseControl`
 
diff --git a/System/Timeout/Lifted.hs b/System/Timeout/Lifted.hs
--- a/System/Timeout/Lifted.hs
+++ b/System/Timeout/Lifted.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE CPP, NoImplicitPrelude, FlexibleContexts #-}
 
 #if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 
 -------------------------------------------------------------------------------
diff --git a/bench/bench.hs b/bench/bench.hs
--- a/bench/bench.hs
+++ b/bench/bench.hs
@@ -45,24 +45,28 @@
   , b "bracket_"  benchBracket_ MP.bracket_  MC.bracket_
   , b "catch"     benchCatch    MP.catch     MC.catch
   , b "try"       benchTry      MP.try       MC.try
-  , b "mask"      benchMask     mpMask       MC.mask
 
+  , bgroup "mask"
+    [ bench "monad-peel"    $ whnfIO $ benchMask mpMask
+    , bench "monad-control" $ whnfIO $ benchMask MC.mask
+    ]
+
   , bgroup "liftIOOp"
-    [ bench "monad-peel"    $ exe $ MP.liftIOOp   (E.bracket nop (\_ -> nop))
-                                                  (\_ -> nop)
-    , bench "monad-control" $ exe $ MC.liftBaseOp (E.bracket nop (\_ -> nop))
-                                                  (\_ -> nop)
+    [ bench "monad-peel"    $ whnfIO $ exe $ MP.liftIOOp   (E.bracket nop (\_ -> nop))
+                                                           (\_ -> nop)
+    , bench "monad-control" $ whnfIO $ exe $ MC.liftBaseOp (E.bracket nop (\_ -> nop))
+                                                           (\_ -> nop)
     ]
 
   , bgroup "liftIOOp_"
-    [ bench "monad-peel"    $ exe $ MP.liftIOOp_   (E.bracket_ nop nop) nop
-    , bench "monad-control" $ exe $ MC.liftBaseOp_ (E.bracket_ nop nop) nop
+    [ bench "monad-peel"    $ whnfIO $ exe $ MP.liftIOOp_   (E.bracket_ nop nop) nop
+    , bench "monad-control" $ whnfIO $ exe $ MC.liftBaseOp_ (E.bracket_ nop nop) nop
     ]
   ]
 
 b name bnch peel mndCtrl = bgroup name
-  [ bench "monad-peel"    $ bnch peel
-  , bench "monad-control" $ bnch mndCtrl
+  [ bench "monad-peel"    $ whnfIO $ bnch peel
+  , bench "monad-control" $ whnfIO $ bnch mndCtrl
   ]
 
 --------------------------------------------------------------------------------
diff --git a/include/inlinable.h b/include/inlinable.h
--- a/include/inlinable.h
+++ b/include/inlinable.h
@@ -1,3 +1,3 @@
-#if __GLASCOW_HASKELL__ < 700
-#define INLINABLE INLINE 
+#if __GLASGOW_HASKELL__ < 700
+#define INLINABLE INLINE
 #endif
diff --git a/lifted-base.cabal b/lifted-base.cabal
--- a/lifted-base.cabal
+++ b/lifted-base.cabal
@@ -1,5 +1,5 @@
 Name:                lifted-base
-Version:             0.2.3.0
+Version:             0.2.3.12
 Synopsis:            lifted IO operations from the base library
 License:             BSD3
 License-file:        LICENSE
@@ -29,7 +29,7 @@
 
 source-repository head
   type:     git
-  location: git://github.com/basvandijk/lifted-base.git
+  location: https://github.com/basvandijk/lifted-base.git
 
 --------------------------------------------------------------------------------
 
@@ -47,9 +47,9 @@
     Exposed-modules:
                    Control.Concurrent.SampleVar.Lifted
 
-  Build-depends: base                 >= 3     && < 5
-               , transformers-base    >= 0.4   && < 0.5
-               , monad-control        >= 0.3   && < 0.4
+  Build-depends: base              >= 3 && < 5
+               , transformers-base >= 0.4
+               , monad-control     >= 0.3
 
   Include-dirs: include
   Includes:     inlinable.h
@@ -64,13 +64,14 @@
   hs-source-dirs: test
 
   build-depends: lifted-base
-               , base                 >= 3     && < 5
-               , transformers         >= 0.4   && < 0.5
-               , transformers-base    >= 0.4   && < 0.5
-               , monad-control        >= 0.3   && < 0.4
-               , HUnit                >= 1.2.2 && < 1.3
-               , test-framework       >= 0.2.4 && < 0.9
-               , test-framework-hunit >= 0.2.4 && < 0.4
+               , base                 >= 3 && < 5
+               , transformers         >= 0.3
+               , transformers-base    >= 0.4.4
+               , transformers-compat  >= 0.3
+               , monad-control        >= 1.0.0.3
+               , HUnit                >= 1.2.2
+               , test-framework       >= 0.2.4
+               , test-framework-hunit >= 0.2.4
 
   Include-dirs: include
   Includes:     inlinable.h
@@ -87,8 +88,8 @@
   ghc-options:    -O2
 
   build-depends: lifted-base
-               , base          >= 3   && < 5
-               , transformers  >= 0.2 && < 0.5
-               , criterion     >= 0.5 && < 0.9
-               , monad-control >= 0.3 && < 0.4
-               , monad-peel    >= 0.1 && < 0.2
+               , base          >= 3 && < 5
+               , transformers  >= 0.2
+               , criterion     >= 1
+               , monad-control >= 0.3
+               , monad-peel    >= 0.1
diff --git a/test/test.hs b/test/test.hs
--- a/test/test.hs
+++ b/test/test.hs
@@ -18,6 +18,7 @@
 import Control.Monad.Trans.Reader
 import Control.Monad.Trans.Writer
 import Control.Monad.Trans.Except
+
 import Control.Monad.Trans.State
 import qualified Control.Monad.Trans.RWS as RWS
 
