diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,53 @@
+# Changelog
+
+Notable changes to takusen-oracle. Entries for versions before 0.10.0.0 were
+reconstructed from git history and Hackage release metadata.
+
+## 0.10.0.0 (unreleased)
+
+### Compatibility
+
+- Buildable with GHC 9.10.3 and cabal-install 3.16 (previous release targeted
+  GHC 7-8):
+  - added missing imports (`liftM` in `Control.Exception.MonadIO` and
+    `Database.Enumerator`; `when`, `void` in `Database.Enumerator`)
+  - resolved the `Sunday` constructor ambiguity between `System.Time`
+    (old-time) and `time >= 1.12` (`Database.Util`,
+    `Database.Oracle.OCIFunctions`)
+  - added `FlexibleContexts` and `NondecreasingIndentation` pragmas required
+    by modern GHC in the library and test modules
+  - `Test.MiniUnitTest` imports `catch` from `Control.Exception` explicitly
+    (it used to come from `Prelude` in pre-base-4 GHC) with an explicit
+    `SomeException` annotation
+- Removed the call to `OCITerminate()` when disconnecting from the database
+  (#12; merged in 2019 but never included in a Hackage release)
+
+### Build system
+
+- `custom-setup` stanza with explicit `setup-depends` added to the cabal file
+  and `cabal-version` raised to `1.24`; without it, modern cabal-install
+  cannot resolve the custom `Setup.hs` dependencies
+- Oracle Instant Client is expected under `~/instantclient` (see
+  `Extra-Lib-Dirs` in the cabal file); create a symlink if your client
+  lives elsewhere
+- Haskell Language Server 2.14 works out of the box (cabal cradle)
+- The test executables are enabled via `flags: +buildtests` (unchanged), e.g.
+  through a local `cabal.project`
+
+## 0.9.4.1 (2016-11-08)
+
+- GHC 8 support
+- Fix for statement reuse detection (#8)
+- Simplified build configuration: the build no longer guesses the Oracle
+  home; link against the Instant Client via `Extra-Lib-Dirs`
+
+## 0.9.3 (2015)
+
+- `OCI_THREADED` mode when creating the environment handle (#4)
+- Fix for a resource leak in command binding with prepared statements
+- Sources converted from literate Haskell (`.lhs`) to `.hs`
+
+## 0.9.0 - 0.9.2
+
+- Initial Oracle-only split from the original Takusen library; support for
+  Oracle 11gR2/12c instant client and GHC 7.4+. See git history for details.
diff --git a/Control/Exception/MonadIO.hs b/Control/Exception/MonadIO.hs
--- a/Control/Exception/MonadIO.hs
+++ b/Control/Exception/MonadIO.hs
@@ -6,6 +6,7 @@
 ) where
 
 import Control.Monad.Trans
+import Control.Monad (liftM)
 import Control.Exception
 import Control.Monad.Reader
 
diff --git a/Database/Enumerator.hs b/Database/Enumerator.hs
--- a/Database/Enumerator.hs
+++ b/Database/Enumerator.hs
@@ -117,7 +117,7 @@
 import Data.IORef
 -- import Data.Time
 import Data.Maybe (fromMaybe, isNothing)
--- import Control.Monad (liftM)
+import Control.Monad (liftM, when, void)
 -- import Control.Monad.Trans (liftIO)
 import Control.Applicative (Applicative)
 import Control.Exception
diff --git a/Database/Oracle/Enumerator.hs b/Database/Oracle/Enumerator.hs
--- a/Database/Oracle/Enumerator.hs
+++ b/Database/Oracle/Enumerator.hs
@@ -14,6 +14,7 @@
 {-# LANGUAGE UndecidableInstances #-}
 {-# LANGUAGE TypeSynonymInstances #-}
 {-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE ScopedTypeVariables #-}
@@ -298,7 +299,6 @@
   logoff err conn
   dispose err
   dispose env
-  OCI.terminate
 
 
 -- |Oracle only supports ReadCommitted and Serialisable.
diff --git a/Database/Oracle/OCIFunctions.hs b/Database/Oracle/OCIFunctions.hs
--- a/Database/Oracle/OCIFunctions.hs
+++ b/Database/Oracle/OCIFunctions.hs
@@ -37,7 +37,7 @@
 import Control.Monad
 import Control.Exception
 import Data.Dynamic
-import Data.Time
+import Data.Time hiding (Sunday)
 import System.Time
 
 
diff --git a/Database/Oracle/Test/Enumerator.hs b/Database/Oracle/Test/Enumerator.hs
--- a/Database/Oracle/Test/Enumerator.hs
+++ b/Database/Oracle/Test/Enumerator.hs
@@ -45,6 +45,8 @@
 {-# LANGUAGE UndecidableInstances #-}
 {-# LANGUAGE TypeSynonymInstances #-}
 {-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE NondecreasingIndentation #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE ScopedTypeVariables #-}
diff --git a/Database/Test/Enumerator.hs b/Database/Test/Enumerator.hs
--- a/Database/Test/Enumerator.hs
+++ b/Database/Test/Enumerator.hs
@@ -20,7 +20,7 @@
 
 -}
 
-{-# LANGUAGE OverlappingInstances, ScopedTypeVariables #-}
+{-# LANGUAGE OverlappingInstances, ScopedTypeVariables, FlexibleContexts #-}
 
 module Database.Test.Enumerator where
 
diff --git a/Database/Test/Performance.hs b/Database/Test/Performance.hs
--- a/Database/Test/Performance.hs
+++ b/Database/Test/Performance.hs
@@ -9,7 +9,7 @@
 Performance tests. Currently just tests large result sets.
 -}
 
-{-# LANGUAGE OverlappingInstances #-}
+{-# LANGUAGE OverlappingInstances, FlexibleContexts #-}
 
 module Database.Test.Performance where
 
diff --git a/Database/Util.hs b/Database/Util.hs
--- a/Database/Util.hs
+++ b/Database/Util.hs
@@ -22,7 +22,7 @@
 import Data.Int
 import Data.List
 import Data.Char
-import Data.Time
+import Data.Time hiding (Sunday)
 import Data.Word (Word8)
 import Foreign.Ptr (Ptr, castPtr)
 import Foreign.Marshal.Array (peekArray)
diff --git a/Test/MiniUnitTest.hs b/Test/MiniUnitTest.hs
--- a/Test/MiniUnitTest.hs
+++ b/Test/MiniUnitTest.hs
@@ -1,10 +1,12 @@
 
 {-# LANGUAGE NoMonomorphismRestriction #-}
+{-# LANGUAGE ScopedTypeVariables #-}
  
 module Test.MiniUnitTest where
 
 import Test.MiniUnit
 import Data.IORef
+import Control.Exception (catch, SomeException)
 import Control.Exception.MonadIO
 import Control.Monad.Trans (liftIO)
 
@@ -25,7 +27,7 @@
 test__assertFailure = catch
   (assertFailure "test__assertFailure"
     >> error "test__assertFailure: failed: exception not thrown.")
-  (\e -> print_ "test__assertFailure OK")
+  (\(e :: SomeException) -> print_ "test__assertFailure OK")
 
 reportResult name result = do
   case result of
diff --git a/takusen-oracle.cabal b/takusen-oracle.cabal
--- a/takusen-oracle.cabal
+++ b/takusen-oracle.cabal
@@ -1,5 +1,5 @@
 Name:           takusen-oracle
-Version:        0.9.4.1
+Version:        0.10.0.0
 License:        BSD3
 License-file:   LICENSE
 Author:         Alistair Bayley, Oleg Kiselyov, Pavel Ryzhov
@@ -9,8 +9,9 @@
 Homepage:       https://github.com/paulrzcz/takusen-oracle.git
 Package-url:    https://github.com/paulrzcz/takusen-oracle.git
 Category:       Database
-Build-type:     Simple
-Cabal-Version:  >= 1.16
+Build-type:     Custom
+cabal-version:  1.24
+
 Synopsis:       Database library with left-fold interface for Oracle.
 Description:
     Takusen-Oracle is a Oracle access library. Like HSQL and HDBC, we support
@@ -24,11 +25,18 @@
       Database/Oracle/OCIFunctions_stub.c
       Database/Oracle/OCIFunctions_stub.h
 
+extra-source-files:
+      CHANGELOG.md
+
 source-repository this
     type:       git
     location:   https://github.com/paulrzcz/takusen-oracle.git
-    tag:        0.9.4.1
+    tag:        0.10.0.0
 
+custom-setup
+    setup-depends:  base >= 4.5 && < 5
+                  , Cabal >= 1.24 && < 4
+
 Flag buildtests
   Description: Build test executables
   Default:     False
@@ -64,7 +72,7 @@
                 , old-time
                 , QuickCheck    ==2.*
                 , random
-  Extensions: CPP DeriveDataTypeable ScopedTypeVariables
+  default-extensions: CPP DeriveDataTypeable ScopedTypeVariables
 
 Executable miniunit_tests
   Default-Language: Haskell2010
@@ -97,7 +105,7 @@
     Extra-Libraries: clntsh
   Extra-Lib-Dirs: /Users/paul/instantclient
 
-  Build-Depends:  base        >= 4.5   && < 5
+  Build-Depends:  base >= 4.5 && < 5
                 , mtl
                 , time
                 , old-time
