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/acquire.cabal b/acquire.cabal
--- a/acquire.cabal
+++ b/acquire.cabal
@@ -1,50 +1,69 @@
-name:
-  acquire
-version:
-  0.3.1
-synopsis:
-  Abstraction over management of resources
+cabal-version: 3.0
+name:          acquire
+version:       0.3.1.1
+synopsis:      Abstraction over management of resources
 description:
   An implementation of the abstraction suggested in
   <http://www.haskellforall.com/2013/06/the-resource-applicative.html a blog-post by Gabriel Gonzalez>.
-category:
-  Resources
-homepage:
-  https://github.com/metrix-ai/acquire
-bug-reports:
-  https://github.com/metrix-ai/acquire/issues
-author:
-  Nikita Volkov <nikita.y.volkov@mail.ru>
-maintainer:
-  Metrix.AI Tech Team <tech@metrix.ai>
-copyright:
-  (c) 2013 Gabriel Gonzalez, 2018 Metrix.AI
-license:
-  MIT
-license-file:
-  LICENSE
-build-type:
-  Simple
-cabal-version:
-  >=1.10
 
+category:      Resources
+homepage:      https://github.com/metrix-ai/acquire
+bug-reports:   https://github.com/metrix-ai/acquire/issues
+author:        Nikita Volkov <nikita.y.volkov@mail.ru>
+maintainer:    Metrix.AI Tech Team <tech@metrix.ai>
+copyright:     (c) 2013 Gabriel Gonzalez, 2018 Metrix.AI
+license:       MIT
+license-file:  LICENSE
+build-type:    Simple
+
 source-repository head
-  type:
-    git
-  location:
-    git://github.com/metrix-ai/acquire.git
+  type:     git
+  location: git://github.com/metrix-ai/acquire.git
 
 library
-  hs-source-dirs:
-    library
+  hs-source-dirs:     library
   default-extensions:
-    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, InstanceSigs, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
-  default-language:
-    Haskell2010
-  exposed-modules:
-    Acquire
-  other-modules:
-    Acquire.Prelude
+    NoImplicitPrelude
+    NoMonomorphismRestriction
+    Arrows
+    BangPatterns
+    ConstraintKinds
+    DataKinds
+    DefaultSignatures
+    DeriveDataTypeable
+    DeriveFoldable
+    DeriveFunctor
+    DeriveGeneric
+    DeriveTraversable
+    EmptyDataDecls
+    FlexibleContexts
+    FlexibleInstances
+    FunctionalDependencies
+    GADTs
+    GeneralizedNewtypeDeriving
+    InstanceSigs
+    LambdaCase
+    LiberalTypeSynonyms
+    MagicHash
+    MultiParamTypeClasses
+    MultiWayIf
+    OverloadedStrings
+    ParallelListComp
+    PatternGuards
+    QuasiQuotes
+    RankNTypes
+    RecordWildCards
+    ScopedTypeVariables
+    StandaloneDeriving
+    TemplateHaskell
+    TupleSections
+    TypeFamilies
+    TypeOperators
+    UnboxedTuples
+
+  default-language:   Haskell2010
+  exposed-modules:    Acquire
+  other-modules:      Acquire.Prelude
   build-depends:
-    base >=4.9 && <5,
-    transformers >=0.5 && <0.6
+    , base >=4.9 && <5
+    , transformers >=0.5 && <0.7
diff --git a/library/Acquire.hs b/library/Acquire.hs
--- a/library/Acquire.hs
+++ b/library/Acquire.hs
@@ -1,34 +1,31 @@
-module Acquire
-where
+module Acquire where
 
 import Acquire.Prelude
 
-
 -- * IO
+
 -------------------------
 
-{-|
-Execute an action, which uses a resource,
-having a resource provider.
--}
+-- |
+-- Execute an action, which uses a resource,
+-- having a resource provider.
 acquireAndUse :: Acquire env -> Use env err res -> IO (Either err res)
 acquireAndUse (Acquire acquireIo) (Use useRdr) =
   bracket acquireIo snd (runExceptT . runReaderT useRdr . fst)
 
-
 -- * Acquire
--------------------------
 
-{-|
-Resource provider.
-Abstracts over resource acquisition and releasing.
-
-Composes well, allowing you to merge multiple providers into one.
+-------------------------
 
-Implementation of http://www.haskellforall.com/2013/06/the-resource-applicative.html
--}
-newtype Acquire env =
-  Acquire (IO (env, IO ()))
+-- |
+-- Resource provider.
+-- Abstracts over resource acquisition and releasing.
+--
+-- Composes well, allowing you to merge multiple providers into one.
+--
+-- Implementation of http://www.haskellforall.com/2013/06/the-resource-applicative.html
+newtype Acquire env
+  = Acquire (IO (env, IO ()))
 
 instance Functor Acquire where
   fmap f (Acquire io) =
@@ -55,15 +52,14 @@
 
 instance MonadIO Acquire where
   liftIO io =
-    Acquire (fmap (, return ()) io)
-
+    Acquire (fmap (,return ()) io)
 
 -- * Use
+
 -------------------------
 
-{-|
-Resource handler, which has a notion of pure errors.
--}
+-- |
+-- Resource handler, which has a notion of pure errors.
 newtype Use env err res = Use (ReaderT env (ExceptT err IO) res)
   deriving (Functor, Applicative, Alternative, Monad, MonadPlus, MonadIO)
 
@@ -71,20 +67,17 @@
   first = mapErr
   second = fmap
 
-{-|
-Map the environment of a resource handler.
--}
+-- |
+-- Map the environment of a resource handler.
 mapEnv :: (b -> a) -> Use a err res -> Use b err res
 mapEnv fn (Use rdr) = Use (withReaderT fn rdr)
 
-{-|
-Map the error of a resource handler.
--}
+-- |
+-- Map the error of a resource handler.
 mapErr :: (a -> b) -> Use env a res -> Use env b res
 mapErr fn (Use rdr) = Use (mapReaderT (withExceptT fn) rdr)
 
-{-|
-Map both the environment and the error of a resource handler.
--}
+-- |
+-- Map both the environment and the error of a resource handler.
 mapEnvAndErr :: (envB -> envA) -> (errA -> errB) -> Use envA errA res -> Use envB errB res
 mapEnvAndErr envProj errProj (Use rdr) = Use (withReaderT envProj (mapReaderT (withExceptT errProj) rdr))
diff --git a/library/Acquire/Prelude.hs b/library/Acquire/Prelude.hs
--- a/library/Acquire/Prelude.hs
+++ b/library/Acquire/Prelude.hs
@@ -1,20 +1,24 @@
 module Acquire.Prelude
-( 
-  module Exports,
-)
+  ( module Exports,
+  )
 where
 
--- base
--------------------------
 import Control.Applicative as Exports
 import Control.Arrow as Exports hiding (first, second)
 import Control.Category as Exports
 import Control.Concurrent as Exports
 import Control.Exception as Exports
-import Control.Monad as Exports hiding (mapM_, sequence_, forM_, msum, mapM, sequence, forM)
-import Control.Monad.IO.Class as Exports
+import Control.Monad as Exports hiding (forM, forM_, mapM, mapM_, msum, sequence, sequence_)
 import Control.Monad.Fix as Exports hiding (fix)
+import Control.Monad.IO.Class as Exports
 import Control.Monad.ST as Exports
+import Control.Monad.Trans.Class as Exports
+import Control.Monad.Trans.Cont as Exports hiding (callCC, shift)
+import Control.Monad.Trans.Except as Exports (Except, ExceptT (ExceptT), except, mapExcept, mapExceptT, runExcept, runExceptT, withExcept, withExceptT)
+import Control.Monad.Trans.Maybe as Exports (MaybeT (MaybeT), exceptToMaybeT, mapMaybeT, maybeToExceptT)
+import Control.Monad.Trans.Reader as Exports (Reader, ReaderT (ReaderT), mapReader, mapReaderT, runReader, runReaderT, withReader, withReaderT)
+import Control.Monad.Trans.State.Strict as Exports (State, StateT (StateT), evalState, evalStateT, execState, execStateT, mapState, mapStateT, runState, runStateT, withState, withStateT)
+import Control.Monad.Trans.Writer.Strict as Exports (Writer, WriterT (WriterT), execWriter, execWriterT, mapWriter, mapWriterT, runWriter)
 import Data.Bifunctor as Exports
 import Data.Bits as Exports
 import Data.Bool as Exports
@@ -28,10 +32,10 @@
 import Data.Foldable as Exports
 import Data.Function as Exports hiding (id, (.))
 import Data.Functor as Exports
-import Data.Int as Exports
 import Data.IORef as Exports
+import Data.Int as Exports
 import Data.Ix as Exports
-import Data.List as Exports hiding (sortOn, isSubsequenceOf, uncons, concat, foldr, foldl1, maximum, minimum, product, sum, all, and, any, concatMap, elem, foldl, foldr1, notElem, or, find, maximumBy, minimumBy, mapAccumL, mapAccumR, foldl')
+import Data.List as Exports hiding (all, and, any, concat, concatMap, elem, find, foldl, foldl', foldl1, foldr, foldr1, isSubsequenceOf, mapAccumL, mapAccumR, maximum, maximumBy, minimum, minimumBy, notElem, or, product, sortOn, sum, uncons)
 import Data.Maybe as Exports
 import Data.Monoid as Exports
 import Data.Ord as Exports
@@ -49,12 +53,11 @@
 import Foreign.Ptr as Exports
 import Foreign.StablePtr as Exports
 import Foreign.Storable as Exports
-import GHC.Conc as Exports hiding (withMVar, threadWaitWriteSTM, threadWaitWrite, threadWaitReadSTM, threadWaitRead)
-import GHC.Exts as Exports (lazy, inline, sortWith, groupWith)
+import GHC.Conc as Exports hiding (threadWaitRead, threadWaitReadSTM, threadWaitWrite, threadWaitWriteSTM, withMVar)
+import GHC.Exts as Exports (groupWith, inline, lazy, sortWith)
 import GHC.Generics as Exports (Generic)
 import GHC.IO.Exception as Exports
 import Numeric as Exports
-import Prelude as Exports hiding (concat, foldr, mapM_, sequence_, foldl1, maximum, minimum, product, sum, all, and, any, concatMap, elem, foldl, foldr1, notElem, or, mapM, sequence, id, (.))
 import System.Environment as Exports
 import System.Exit as Exports
 import System.IO as Exports (Handle, hClose)
@@ -64,18 +67,8 @@
 import System.Mem.StableName as Exports
 import System.Timeout as Exports
 import Text.ParserCombinators.ReadP as Exports (ReadP, ReadS, readP_to_S, readS_to_P)
-import Text.ParserCombinators.ReadPrec as Exports (ReadPrec, readPrec_to_P, readP_to_Prec, readPrec_to_S, readS_to_Prec)
-import Text.Printf as Exports (printf, hPrintf)
-import Text.Read as Exports (Read(..), readMaybe, readEither)
+import Text.ParserCombinators.ReadPrec as Exports (ReadPrec, readP_to_Prec, readPrec_to_P, readPrec_to_S, readS_to_Prec)
+import Text.Printf as Exports (hPrintf, printf)
+import Text.Read as Exports (Read (..), readEither, readMaybe)
 import Unsafe.Coerce as Exports
-
--- transformers
--------------------------
-import Control.Monad.IO.Class as Exports
-import Control.Monad.Trans.Class as Exports
-import Control.Monad.Trans.Cont as Exports hiding (shift, callCC)
-import Control.Monad.Trans.Except as Exports (ExceptT(ExceptT), Except, except, runExcept, runExceptT, mapExcept, mapExceptT, withExcept, withExceptT)
-import Control.Monad.Trans.Maybe as Exports
-import Control.Monad.Trans.Reader as Exports (Reader, runReader, mapReader, withReader, ReaderT(ReaderT), runReaderT, mapReaderT, withReaderT)
-import Control.Monad.Trans.State.Strict as Exports (State, runState, evalState, execState, mapState, withState, StateT(StateT), runStateT, evalStateT, execStateT, mapStateT, withStateT)
-import Control.Monad.Trans.Writer.Strict as Exports (Writer, runWriter, execWriter, mapWriter, WriterT(..), execWriterT, mapWriterT)
+import Prelude as Exports hiding (all, and, any, concat, concatMap, elem, foldl, foldl1, foldr, foldr1, id, mapM, mapM_, maximum, minimum, notElem, or, product, sequence, sequence_, sum, (.))
