diff --git a/CHANGES.markdown b/CHANGES.markdown
--- a/CHANGES.markdown
+++ b/CHANGES.markdown
@@ -1,3 +1,6 @@
+# 0.4.1
+ * Add support for GHC 9.14 (thanks @alexfmpe)
+
 # 0.4
  * Account for `default-language` sections in Cabal files ([#85](https://github.com/martijnbastiaan/doctest-parallel/issues/85))
  * Add support for Cabal 3.14 ([#88](https://github.com/martijnbastiaan/doctest-parallel/pull/88))
diff --git a/doctest-parallel.cabal b/doctest-parallel.cabal
--- a/doctest-parallel.cabal
+++ b/doctest-parallel.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.0
 
 name:           doctest-parallel
-version:        0.4
+version:        0.4.1
 synopsis:       Test interactive Haskell examples
 description:    The doctest program checks examples in source code comments.  It is modeled
                 after doctest for Python (<https://docs.python.org/3/library/doctest.html>).
@@ -24,6 +24,7 @@
   , GHC == 9.8.4
   , GHC == 9.10.2
   , GHC == 9.12.2
+  , GHC == 9.14.1
 
 extra-source-files:
     example/example.cabal
@@ -90,7 +91,7 @@
       Data.List.Extra
       Paths_doctest_parallel
   build-depends:
-      Cabal >= 2.4 && < 3.15
+      Cabal >= 2.4 && < 3.17
     , Glob
     , base >=4.10 && <5
     , base-compat >=0.7.0
@@ -100,7 +101,7 @@
     , directory
     , exceptions
     , filepath
-    , ghc >=9.0 && <9.13
+    , ghc >=9.0 && <9.15
     , ghc-exactprint
     , ghc-paths >=0.1.0.9
     , process
diff --git a/src/Test/DocTest/Internal/Extract.hs b/src/Test/DocTest/Internal/Extract.hs
--- a/src/Test/DocTest/Internal/Extract.hs
+++ b/src/Test/DocTest/Internal/Extract.hs
@@ -66,8 +66,12 @@
 #else
 import           GHC.Types.SourceError (throwErrors)
 import           GHC.Parser.Header (getOptionsFromFile)
+#if __GLASGOW_HASKELL__ < 914
 import           GHC.Driver.Config.Parser (initParserOpts)
+#else
+import           GHC.Driver.Config.Parser (initParserOpts, supportedLanguagePragmas)
 #endif
+#endif
 
 #if __GLASGOW_HASKELL__ < 904
 initParserOpts :: DynFlags -> DynFlags
@@ -170,8 +174,15 @@
 #else
   (_, flagsFromFile) <-
 #endif
+
+#if __GLASGOW_HASKELL__ < 914
     liftIO $ getOptionsFromFile (initParserOpts dynFlags0) path
   (dynFlags1, _, _) <- parseDynamicFilePragma dynFlags0 flagsFromFile
+#else
+    liftIO $ getOptionsFromFile (initParserOpts dynFlags0) (supportedLanguagePragmas dynFlags0) path
+  logger <- getLogger
+  (dynFlags1, _, _) <- parseDynamicFilePragma logger dynFlags0 flagsFromFile
+#endif
 
 #if MIN_VERSION_ghc_exactprint(1,3,0)
   result <- parseModuleEpAnnsWithCppInternal defaultCppOptions dynFlags1 path
