diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+2.0.0.3
+---
+* Fixed build for GHC 9.4+
+
 2.0.0.0
 ---
 * replaced `Integral` instance with `Fractional` instance (see #8 and #14)
diff --git a/modular-arithmetic.cabal b/modular-arithmetic.cabal
--- a/modular-arithmetic.cabal
+++ b/modular-arithmetic.cabal
@@ -1,6 +1,6 @@
 cabal-version:       2.2
 name:                modular-arithmetic
-version:             2.0.0.2
+version:             2.0.0.3
 synopsis:            A type for integers modulo some constant.
 
 description:         A convenient type for working with integers modulo some constant. It saves you from manually wrapping numeric operations all over the place and prevents a range of simple mistakes. @Integer `Mod` 7@ is the type of integers (mod 7) backed by @Integer@.
@@ -15,7 +15,7 @@
 maintainer:          Tikhon Jelvis <tikhon@jelv.is>
 category:            Math
 build-type:          Simple
-extra-source-files:  README.md
+extra-doc-files:  README.md
                    , CHANGELOG.md
 
 source-repository head
@@ -37,6 +37,6 @@
   default-language:    Haskell2010
   type:                exitcode-stdio-1.0
   build-depends:       base >4.9 && <5
-                     , doctest >= 0.9
+                     , doctest >= 0.9 && <0.22
   if impl(ghc < 9.2.1)
     build-depends:     typelits-witnesses <0.5
diff --git a/src/Data/Modular.hs b/src/Data/Modular.hs
--- a/src/Data/Modular.hs
+++ b/src/Data/Modular.hs
@@ -1,15 +1,17 @@
-{-# LANGUAGE AllowAmbiguousTypes #-}
-{-# LANGUAGE ConstraintKinds     #-}
-{-# LANGUAGE CPP                 #-}
-{-# LANGUAGE DataKinds           #-}
-{-# LANGUAGE ExplicitNamespaces  #-}
-{-# LANGUAGE KindSignatures      #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE TypeApplications    #-}
-{-# LANGUAGE TypeOperators       #-}
-{-# LANGUAGE GADTs               #-}
-{-# LANGUAGE TypeFamilies        #-}
+{-# LANGUAGE AllowAmbiguousTypes  #-}
+{-# LANGUAGE CPP                  #-}
+{-# LANGUAGE ConstraintKinds      #-}
+{-# LANGUAGE DataKinds            #-}
+{-# LANGUAGE ExplicitNamespaces   #-}
+{-# LANGUAGE GADTs                #-}
+{-# LANGUAGE KindSignatures       #-}
+{-# LANGUAGE ScopedTypeVariables  #-}
+{-# LANGUAGE TypeApplications     #-}
+{-# LANGUAGE TypeFamilies         #-}
+{-# LANGUAGE TypeOperators        #-}
+{-# LANGUAGE UndecidableInstances #-}
 
+
 -- |
 -- Types for working with integers modulo some constant.
 module Data.Modular (
@@ -25,23 +27,23 @@
   modVal, SomeMod, someModVal
 ) where
 
-import           Control.Arrow (first)
+import           Control.Arrow          (first)
 
-import           Data.Proxy    (Proxy (..))
-import           Data.Ratio    ((%), denominator, numerator)
+import           Data.Proxy             (Proxy (..))
+import           Data.Ratio             (denominator, numerator, (%))
 
-import           Text.Printf   (printf)
+import           Text.Printf            (printf)
 
 #if MIN_VERSION_base(4,11,0)
-import           GHC.TypeLits hiding (Mod)
+import           GHC.TypeLits           hiding (Mod)
 #else
 import           GHC.TypeLits
 #endif
 
 #if !MIN_VERSION_base(4,16,0)
-import           Data.Type.Equality     ((:~:)(..))
+import           Data.Type.Equality     ((:~:) (..))
 
-import           GHC.TypeLits.Compare   ((%<=?), (:<=?)(LE, NLE))
+import           GHC.TypeLits.Compare   ((%<=?), (:<=?) (LE, NLE))
 import           GHC.TypeLits.Witnesses (SNat (SNat))
 #endif
 
