diff --git a/Cabal-syntax.cabal b/Cabal-syntax.cabal
--- a/Cabal-syntax.cabal
+++ b/Cabal-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-syntax
-version:       3.14.1.0
+version:       3.14.2.0
 copyright:     2003-2024, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,1 +1,1 @@
-Please see https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.14.1.0.md
+Please see https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.14.2.0.md
diff --git a/src/Distribution/Backpack.hs b/src/Distribution/Backpack.hs
--- a/src/Distribution/Backpack.hs
+++ b/src/Distribution/Backpack.hs
@@ -91,7 +91,7 @@
     -- MUST NOT be for an indefinite component; an 'OpenUnitId'
     -- is guaranteed not to have any holes.
     DefiniteUnitId DefUnitId
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 -- TODO: cache holes?
 
@@ -165,7 +165,7 @@
 data OpenModule
   = OpenModule OpenUnitId ModuleName
   | OpenModuleVar ModuleName
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary OpenModule
 instance Structured OpenModule
diff --git a/src/Distribution/CabalSpecVersion.hs b/src/Distribution/CabalSpecVersion.hs
--- a/src/Distribution/CabalSpecVersion.hs
+++ b/src/Distribution/CabalSpecVersion.hs
@@ -35,7 +35,7 @@
   | -- 3.10: no changes
     CabalSpecV3_12
   | CabalSpecV3_14
-  deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data, Generic)
+  deriving (Eq, Ord, Show, Read, Enum, Bounded, Data, Generic)
 
 instance Binary CabalSpecVersion
 instance Structured CabalSpecVersion
diff --git a/src/Distribution/Compat/Binary.hs b/src/Distribution/Compat/Binary.hs
--- a/src/Distribution/Compat/Binary.hs
+++ b/src/Distribution/Compat/Binary.hs
@@ -1,6 +1,3 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE PatternSynonyms #-}
-
 module Distribution.Compat.Binary
   ( decodeOrFailIO
   , decodeFileOrFail'
diff --git a/src/Distribution/Compat/Exception.hs b/src/Distribution/Compat/Exception.hs
--- a/src/Distribution/Compat/Exception.hs
+++ b/src/Distribution/Compat/Exception.hs
@@ -1,5 +1,3 @@
-{-# LANGUAGE CPP #-}
-
 module Distribution.Compat.Exception
   ( catchIO
   , catchExit
diff --git a/src/Distribution/Compat/Graph.hs b/src/Distribution/Compat/Graph.hs
--- a/src/Distribution/Compat/Graph.hs
+++ b/src/Distribution/Compat/Graph.hs
@@ -1,16 +1,10 @@
 {-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
 
------------------------------------------------------------------------------
-
------------------------------------------------------------------------------
-
 -- |
 -- Module      :  Distribution.Compat.Graph
 -- Copyright   :  (c) Edward Z. Yang 2016
@@ -122,7 +116,6 @@
   , graphKeyToVertex :: Key a -> Maybe G.Vertex
   , graphBroken :: [(a, [Key a])]
   }
-  deriving (Typeable)
 
 -- NB: Not a Functor! (or Traversable), because you need
 -- to restrict Key a ~ Key b.  We provide our own mapping
diff --git a/src/Distribution/Compat/MonadFail.hs b/src/Distribution/Compat/MonadFail.hs
--- a/src/Distribution/Compat/MonadFail.hs
+++ b/src/Distribution/Compat/MonadFail.hs
@@ -1,5 +1,3 @@
-{-# LANGUAGE CPP #-}
-
 -- | Compatibility layer for "Control.Monad.Fail"
 module Distribution.Compat.MonadFail (Control.Monad.Fail.MonadFail (fail)) where
 
diff --git a/src/Distribution/Compat/Newtype.hs b/src/Distribution/Compat/Newtype.hs
--- a/src/Distribution/Compat/Newtype.hs
+++ b/src/Distribution/Compat/Newtype.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE DefaultSignatures #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE FunctionalDependencies #-}
diff --git a/src/Distribution/Compat/NonEmptySet.hs b/src/Distribution/Compat/NonEmptySet.hs
--- a/src/Distribution/Compat/NonEmptySet.hs
+++ b/src/Distribution/Compat/NonEmptySet.hs
@@ -32,7 +32,6 @@
 import Data.Data (Data)
 import Data.List.NonEmpty (NonEmpty (..))
 import Data.Semigroup (Semigroup (..))
-import Data.Typeable (Typeable)
 
 import qualified Data.Foldable as F
 import qualified Data.Set as Set
@@ -48,7 +47,7 @@
 
 -- | @since 3.4.0.0
 newtype NonEmptySet a = NES (Set.Set a)
-  deriving (Eq, Ord, Typeable, Data, Read)
+  deriving (Eq, Ord, Data, Read)
 
 -------------------------------------------------------------------------------
 -- Instances
diff --git a/src/Distribution/Compat/Prelude.hs b/src/Distribution/Compat/Prelude.hs
--- a/src/Distribution/Compat/Prelude.hs
+++ b/src/Distribution/Compat/Prelude.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE Trustworthy #-}
diff --git a/src/Distribution/Compat/Semigroup.hs b/src/Distribution/Compat/Semigroup.hs
--- a/src/Distribution/Compat/Semigroup.hs
+++ b/src/Distribution/Compat/Semigroup.hs
@@ -1,5 +1,3 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
@@ -18,7 +16,6 @@
   , gmempty
   ) where
 
-import Data.Typeable (Typeable)
 import Distribution.Compat.Binary (Binary)
 import Distribution.Utils.Structured (Structured)
 
@@ -39,7 +36,7 @@
 
 -- | A copy of 'Data.Semigroup.Last'.
 newtype Last' a = Last' {getLast' :: a}
-  deriving (Eq, Ord, Read, Show, Generic, Binary, Typeable)
+  deriving (Eq, Ord, Read, Show, Generic, Binary)
 
 instance Structured a => Structured (Last' a)
 
@@ -52,7 +49,7 @@
 -- | A wrapper around 'Maybe', providing the 'Semigroup' and 'Monoid' instances
 -- implemented for 'Maybe' since @base-4.11@.
 newtype Option' a = Option' {getOption' :: Maybe a}
-  deriving (Eq, Ord, Read, Show, Binary, Generic, Functor, Typeable)
+  deriving (Eq, Ord, Read, Show, Binary, Generic, Functor)
 
 instance Structured a => Structured (Option' a)
 
diff --git a/src/Distribution/Compiler.hs b/src/Distribution/Compiler.hs
--- a/src/Distribution/Compiler.hs
+++ b/src/Distribution/Compiler.hs
@@ -78,7 +78,7 @@
   | MHS -- MicroHS, see https://github.com/augustss/MicroHs
   | HaskellSuite String -- string is the id of the actual compiler
   | OtherCompiler String
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary CompilerFlavor
 instance Structured CompilerFlavor
@@ -143,7 +143,6 @@
     , Read
     , Eq
     , Ord
-    , Typeable
     , Data
     , Functor
     , Foldable
@@ -174,7 +173,7 @@
 -- ------------------------------------------------------------
 
 data CompilerId = CompilerId CompilerFlavor Version
-  deriving (Eq, Generic, Ord, Read, Show, Typeable)
+  deriving (Eq, Generic, Ord, Read, Show)
 
 instance Binary CompilerId
 instance Structured CompilerId
@@ -224,7 +223,7 @@
 data AbiTag
   = NoAbiTag
   | AbiTag String
-  deriving (Eq, Generic, Show, Read, Typeable)
+  deriving (Eq, Generic, Show, Read)
 
 instance Binary AbiTag
 instance Structured AbiTag
diff --git a/src/Distribution/FieldGrammar/Class.hs b/src/Distribution/FieldGrammar/Class.hs
--- a/src/Distribution/FieldGrammar/Class.hs
+++ b/src/Distribution/FieldGrammar/Class.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE ConstraintKinds #-}
 {-# LANGUAGE FunctionalDependencies #-}
 {-# LANGUAGE RankNTypes #-}
diff --git a/src/Distribution/Fields/ParseResult.hs b/src/Distribution/Fields/ParseResult.hs
--- a/src/Distribution/Fields/ParseResult.hs
+++ b/src/Distribution/Fields/ParseResult.hs
@@ -1,5 +1,4 @@
 {-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE RankNTypes #-}
 
diff --git a/src/Distribution/License.hs b/src/Distribution/License.hs
--- a/src/Distribution/License.hs
+++ b/src/Distribution/License.hs
@@ -111,7 +111,7 @@
     OtherLicense
   | -- | Indicates an erroneous license name.
     UnknownLicense String
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary License
 instance Structured License
diff --git a/src/Distribution/ModuleName.hs b/src/Distribution/ModuleName.hs
--- a/src/Distribution/ModuleName.hs
+++ b/src/Distribution/ModuleName.hs
@@ -40,7 +40,7 @@
 
 -- | A valid Haskell module name.
 newtype ModuleName = ModuleName ShortText
-  deriving (Eq, Generic, Ord, Read, Show, Typeable, Data)
+  deriving (Eq, Generic, Ord, Read, Show, Data)
 
 unModuleName :: ModuleName -> String
 unModuleName (ModuleName s) = fromShortText s
diff --git a/src/Distribution/PackageDescription/Parsec.hs b/src/Distribution/PackageDescription/Parsec.hs
--- a/src/Distribution/PackageDescription/Parsec.hs
+++ b/src/Distribution/PackageDescription/Parsec.hs
@@ -1,10 +1,7 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE Rank2Types #-}
 {-# LANGUAGE ScopedTypeVariables #-}
-
------------------------------------------------------------------------------
 
 -- |
 -- Module      :  Distribution.PackageDescription.Parsec
diff --git a/src/Distribution/Parsec.hs b/src/Distribution/Parsec.hs
--- a/src/Distribution/Parsec.hs
+++ b/src/Distribution/Parsec.hs
@@ -1,5 +1,4 @@
 {-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE RankNTypes #-}
diff --git a/src/Distribution/SPDX/License.hs b/src/Distribution/SPDX/License.hs
--- a/src/Distribution/SPDX/License.hs
+++ b/src/Distribution/SPDX/License.hs
@@ -41,7 +41,7 @@
     NONE
   | -- | A valid SPDX License Expression as defined in Appendix IV.
     License LicenseExpression
-  deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
+  deriving (Show, Read, Eq, Ord, Data, Generic)
 
 instance Binary License
 instance Structured License
diff --git a/src/Distribution/SPDX/LicenseExceptionId.hs b/src/Distribution/SPDX/LicenseExceptionId.hs
--- a/src/Distribution/SPDX/LicenseExceptionId.hs
+++ b/src/Distribution/SPDX/LicenseExceptionId.hs
@@ -104,7 +104,7 @@
     | Vsftpd_openssl_exception -- ^ @vsftpd-openssl-exception@, vsftpd OpenSSL exception, SPDX License List 3.23, SPDX License List 3.25
     | WxWindows_exception_3_1 -- ^ @WxWindows-exception-3.1@, WxWindows Library Exception 3.1
     | X11vnc_openssl_exception -- ^ @x11vnc-openssl-exception@, x11vnc OpenSSL Exception, SPDX License List 3.23, SPDX License List 3.25
-  deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data, Generic)
+  deriving (Eq, Ord, Enum, Bounded, Show, Read, Data, Generic)
 
 instance Binary LicenseExceptionId where
     put = Binary.putWord8 . fromIntegral . fromEnum
diff --git a/src/Distribution/SPDX/LicenseExpression.hs b/src/Distribution/SPDX/LicenseExpression.hs
--- a/src/Distribution/SPDX/LicenseExpression.hs
+++ b/src/Distribution/SPDX/LicenseExpression.hs
@@ -43,7 +43,7 @@
   = ELicense !SimpleLicenseExpression !(Maybe LicenseExceptionId)
   | EAnd !LicenseExpression !LicenseExpression
   | EOr !LicenseExpression !LicenseExpression
-  deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
+  deriving (Show, Read, Eq, Ord, Data, Generic)
 
 -- | Simple License Expressions.
 data SimpleLicenseExpression
@@ -53,7 +53,7 @@
     ELicenseIdPlus LicenseId
   | -- | A SPDX user defined license reference: For example: @LicenseRef-23@, @LicenseRef-MIT-Style-1@, or @DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2@
     ELicenseRef LicenseRef
-  deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
+  deriving (Show, Read, Eq, Ord, Data, Generic)
 
 simpleLicenseExpression :: LicenseId -> LicenseExpression
 simpleLicenseExpression i = ELicense (ELicenseId i) Nothing
diff --git a/src/Distribution/SPDX/LicenseId.hs b/src/Distribution/SPDX/LicenseId.hs
--- a/src/Distribution/SPDX/LicenseId.hs
+++ b/src/Distribution/SPDX/LicenseId.hs
@@ -674,7 +674,7 @@
     | ZPL_1_1 -- ^ @ZPL-1.1@, Zope Public License 1.1
     | ZPL_2_0 -- ^ @ZPL-2.0@, Zope Public License 2.0
     | ZPL_2_1 -- ^ @ZPL-2.1@, Zope Public License 2.1
-  deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data)
+  deriving (Eq, Ord, Enum, Bounded, Show, Read, Data)
 
 instance Binary LicenseId where
     -- Word16 is encoded in big endianess
diff --git a/src/Distribution/SPDX/LicenseReference.hs b/src/Distribution/SPDX/LicenseReference.hs
--- a/src/Distribution/SPDX/LicenseReference.hs
+++ b/src/Distribution/SPDX/LicenseReference.hs
@@ -24,7 +24,7 @@
   { _lrDocument :: !(Maybe String)
   , _lrLicense :: !String
   }
-  deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
+  deriving (Show, Read, Eq, Ord, Data, Generic)
 
 -- | License reference.
 licenseRef :: LicenseRef -> String
diff --git a/src/Distribution/System.hs b/src/Distribution/System.hs
--- a/src/Distribution/System.hs
+++ b/src/Distribution/System.hs
@@ -1,10 +1,7 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE FlexibleContexts #-}
 
------------------------------------------------------------------------------
-
 -- |
 -- Module      :  Distribution.System
 -- Copyright   :  Duncan Coutts 2007-2008
@@ -110,7 +107,7 @@
   | Wasi
   | Haiku
   | OtherOS String
-  deriving (Eq, Generic, Ord, Show, Read, Typeable, Data)
+  deriving (Eq, Generic, Ord, Show, Read, Data)
 
 instance Binary OS
 instance Structured OS
@@ -213,7 +210,7 @@
   | JavaScript
   | Wasm32
   | OtherArch String
-  deriving (Eq, Generic, Ord, Show, Read, Typeable, Data)
+  deriving (Eq, Generic, Ord, Show, Read, Data)
 
 instance Binary Arch
 instance Structured Arch
@@ -284,7 +281,7 @@
 -- ------------------------------------------------------------
 
 data Platform = Platform Arch OS
-  deriving (Eq, Generic, Ord, Show, Read, Typeable, Data)
+  deriving (Eq, Generic, Ord, Show, Read, Data)
 
 instance Binary Platform
 instance Structured Platform
diff --git a/src/Distribution/Types/AbiDependency.hs b/src/Distribution/Types/AbiDependency.hs
--- a/src/Distribution/Types/AbiDependency.hs
+++ b/src/Distribution/Types/AbiDependency.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 
 module Distribution.Types.AbiDependency where
@@ -27,7 +26,7 @@
   { depUnitId :: Package.UnitId
   , depAbiHash :: Package.AbiHash
   }
-  deriving (Eq, Generic, Read, Show, Typeable)
+  deriving (Eq, Generic, Read, Show)
 
 instance Pretty AbiDependency where
   pretty (AbiDependency uid abi) =
diff --git a/src/Distribution/Types/AbiHash.hs b/src/Distribution/Types/AbiHash.hs
--- a/src/Distribution/Types/AbiHash.hs
+++ b/src/Distribution/Types/AbiHash.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 
@@ -27,7 +26,7 @@
 --
 -- @since 2.0.0.2
 newtype AbiHash = AbiHash ShortText
-  deriving (Eq, Show, Read, Generic, Typeable)
+  deriving (Eq, Show, Read, Generic)
 
 -- | Convert 'AbiHash' to 'String'
 --
diff --git a/src/Distribution/Types/Benchmark.hs b/src/Distribution/Types/Benchmark.hs
--- a/src/Distribution/Types/Benchmark.hs
+++ b/src/Distribution/Types/Benchmark.hs
@@ -27,7 +27,7 @@
   , benchmarkInterface :: BenchmarkInterface
   , benchmarkBuildInfo :: BuildInfo
   }
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary Benchmark
 instance Structured Benchmark
diff --git a/src/Distribution/Types/BenchmarkInterface.hs b/src/Distribution/Types/BenchmarkInterface.hs
--- a/src/Distribution/Types/BenchmarkInterface.hs
+++ b/src/Distribution/Types/BenchmarkInterface.hs
@@ -27,7 +27,7 @@
   | -- | A benchmark that does not conform to one of the above
     -- interfaces for the given reason (e.g. unknown benchmark type).
     BenchmarkUnsupported BenchmarkType
-  deriving (Eq, Ord, Generic, Read, Show, Typeable, Data)
+  deriving (Eq, Ord, Generic, Read, Show, Data)
 
 instance Binary BenchmarkInterface
 instance Structured BenchmarkInterface
diff --git a/src/Distribution/Types/BenchmarkType.hs b/src/Distribution/Types/BenchmarkType.hs
--- a/src/Distribution/Types/BenchmarkType.hs
+++ b/src/Distribution/Types/BenchmarkType.hs
@@ -22,7 +22,7 @@
     BenchmarkTypeExe Version
   | -- | Some unknown benchmark type e.g. \"type: foo\"
     BenchmarkTypeUnknown String Version
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary BenchmarkType
 instance Structured BenchmarkType
diff --git a/src/Distribution/Types/BuildInfo.hs b/src/Distribution/Types/BuildInfo.hs
--- a/src/Distribution/Types/BuildInfo.hs
+++ b/src/Distribution/Types/BuildInfo.hs
@@ -144,7 +144,7 @@
   -- ^ Dependencies specific to a library or executable target
   , mixins :: [Mixin]
   }
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary BuildInfo
 instance Structured BuildInfo
diff --git a/src/Distribution/Types/BuildType.hs b/src/Distribution/Types/BuildType.hs
--- a/src/Distribution/Types/BuildType.hs
+++ b/src/Distribution/Types/BuildType.hs
@@ -30,7 +30,7 @@
   | -- | uses user-supplied @Setup.hs@ or @Setup.lhs@ (default)
     Custom
   | Hooks
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary BuildType
 instance Structured BuildType
diff --git a/src/Distribution/Types/ComponentId.hs b/src/Distribution/Types/ComponentId.hs
--- a/src/Distribution/Types/ComponentId.hs
+++ b/src/Distribution/Types/ComponentId.hs
@@ -32,7 +32,7 @@
 --
 -- @since 2.0.0.2
 newtype ComponentId = ComponentId ShortText
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 -- | Construct a 'ComponentId' from a 'String'
 --
diff --git a/src/Distribution/Types/ComponentName.hs b/src/Distribution/Types/ComponentName.hs
--- a/src/Distribution/Types/ComponentName.hs
+++ b/src/Distribution/Types/ComponentName.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE PatternSynonyms #-}
 
@@ -25,14 +24,14 @@
 data ComponentName
   = CLibName LibraryName
   | CNotLibName NotLibComponentName
-  deriving (Eq, Generic, Ord, Read, Show, Typeable)
+  deriving (Eq, Generic, Ord, Read, Show)
 
 data NotLibComponentName
   = CNLFLibName {toCompName :: UnqualComponentName}
   | CNLExeName {toCompName :: UnqualComponentName}
   | CNLTestName {toCompName :: UnqualComponentName}
   | CNLBenchName {toCompName :: UnqualComponentName}
-  deriving (Eq, Generic, Ord, Read, Show, Typeable)
+  deriving (Eq, Generic, Ord, Read, Show)
 
 pattern CFLibName :: UnqualComponentName -> ComponentName
 pattern CFLibName n = CNotLibName (CNLFLibName n)
diff --git a/src/Distribution/Types/ComponentRequestedSpec.hs b/src/Distribution/Types/ComponentRequestedSpec.hs
--- a/src/Distribution/Types/ComponentRequestedSpec.hs
+++ b/src/Distribution/Types/ComponentRequestedSpec.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 
 module Distribution.Types.ComponentRequestedSpec
@@ -67,7 +66,7 @@
       , benchmarksRequested :: Bool
       }
   | OneComponentRequestedSpec ComponentName
-  deriving (Generic, Read, Show, Eq, Typeable)
+  deriving (Generic, Read, Show, Eq)
 
 instance Binary ComponentRequestedSpec
 instance Structured ComponentRequestedSpec
diff --git a/src/Distribution/Types/CondTree.hs b/src/Distribution/Types/CondTree.hs
--- a/src/Distribution/Types/CondTree.hs
+++ b/src/Distribution/Types/CondTree.hs
@@ -61,7 +61,7 @@
   , condTreeConstraints :: c
   , condTreeComponents :: [CondBranch v c a]
   }
-  deriving (Show, Eq, Typeable, Data, Generic, Functor, Foldable, Traversable)
+  deriving (Show, Eq, Data, Generic, Functor, Foldable, Traversable)
 
 instance (Binary v, Binary c, Binary a) => Binary (CondTree v c a)
 instance (Structured v, Structured c, Structured a) => Structured (CondTree v c a)
@@ -82,7 +82,7 @@
   , condBranchIfTrue :: CondTree v c a
   , condBranchIfFalse :: Maybe (CondTree v c a)
   }
-  deriving (Show, Eq, Typeable, Data, Generic, Functor, Traversable)
+  deriving (Show, Eq, Data, Generic, Functor, Traversable)
 
 -- This instance is written by hand because GHC 8.0.1/8.0.2 infinite
 -- loops when trying to derive it with optimizations.  See
diff --git a/src/Distribution/Types/Condition.hs b/src/Distribution/Types/Condition.hs
--- a/src/Distribution/Types/Condition.hs
+++ b/src/Distribution/Types/Condition.hs
@@ -19,7 +19,7 @@
   | CNot (Condition c)
   | COr (Condition c) (Condition c)
   | CAnd (Condition c) (Condition c)
-  deriving (Show, Eq, Typeable, Data, Generic)
+  deriving (Show, Eq, Data, Generic)
 
 -- | Boolean negation of a 'Condition' value.
 cNot :: Condition a -> Condition a
diff --git a/src/Distribution/Types/ConfVar.hs b/src/Distribution/Types/ConfVar.hs
--- a/src/Distribution/Types/ConfVar.hs
+++ b/src/Distribution/Types/ConfVar.hs
@@ -19,7 +19,7 @@
   | Arch Arch
   | PackageFlag FlagName
   | Impl CompilerFlavor VersionRange
-  deriving (Eq, Show, Typeable, Data, Generic)
+  deriving (Eq, Show, Data, Generic)
 
 instance Binary ConfVar
 instance Structured ConfVar
diff --git a/src/Distribution/Types/Dependency.hs b/src/Distribution/Types/Dependency.hs
--- a/src/Distribution/Types/Dependency.hs
+++ b/src/Distribution/Types/Dependency.hs
@@ -41,7 +41,7 @@
       PackageName
       VersionRange
       (NonEmptySet LibraryName)
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 depPkgName :: Dependency -> PackageName
 depPkgName (Dependency pn _ _) = pn
diff --git a/src/Distribution/Types/ExeDependency.hs b/src/Distribution/Types/ExeDependency.hs
--- a/src/Distribution/Types/ExeDependency.hs
+++ b/src/Distribution/Types/ExeDependency.hs
@@ -25,7 +25,7 @@
       PackageName
       UnqualComponentName -- name of executable component of package
       VersionRange
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary ExeDependency
 instance Structured ExeDependency
diff --git a/src/Distribution/Types/Executable.hs b/src/Distribution/Types/Executable.hs
--- a/src/Distribution/Types/Executable.hs
+++ b/src/Distribution/Types/Executable.hs
@@ -26,7 +26,7 @@
   , exeScope :: ExecutableScope
   , buildInfo :: BuildInfo
   }
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance L.HasBuildInfo Executable where
   buildInfo f l = (\x -> l{buildInfo = x}) <$> f (buildInfo l)
diff --git a/src/Distribution/Types/ExecutableScope.hs b/src/Distribution/Types/ExecutableScope.hs
--- a/src/Distribution/Types/ExecutableScope.hs
+++ b/src/Distribution/Types/ExecutableScope.hs
@@ -18,7 +18,7 @@
 data ExecutableScope
   = ExecutablePublic
   | ExecutablePrivate
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Pretty ExecutableScope where
   pretty ExecutablePublic = Disp.text "public"
diff --git a/src/Distribution/Types/ExposedModule.hs b/src/Distribution/Types/ExposedModule.hs
--- a/src/Distribution/Types/ExposedModule.hs
+++ b/src/Distribution/Types/ExposedModule.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 
 module Distribution.Types.ExposedModule where
@@ -18,7 +17,7 @@
   { exposedName :: ModuleName
   , exposedReexport :: Maybe OpenModule
   }
-  deriving (Eq, Generic, Read, Show, Typeable)
+  deriving (Eq, Generic, Read, Show)
 
 instance Pretty ExposedModule where
   pretty (ExposedModule m reexport) =
diff --git a/src/Distribution/Types/Flag.hs b/src/Distribution/Types/Flag.hs
--- a/src/Distribution/Types/Flag.hs
+++ b/src/Distribution/Types/Flag.hs
@@ -56,7 +56,7 @@
   , flagDefault :: Bool
   , flagManual :: Bool
   }
-  deriving (Show, Eq, Typeable, Data, Generic)
+  deriving (Show, Eq, Data, Generic)
 
 instance Binary PackageFlag
 instance Structured PackageFlag
@@ -80,7 +80,7 @@
 --
 -- @since 2.0.0.2
 newtype FlagName = FlagName ShortText
-  deriving (Eq, Generic, Ord, Show, Read, Typeable, Data, NFData)
+  deriving (Eq, Generic, Ord, Show, Read, Data, NFData)
 
 -- | Construct a 'FlagName' from a 'String'
 --
@@ -127,7 +127,7 @@
 --
 -- TODO: Why we record the multiplicity of the flag?
 newtype FlagAssignment = FlagAssignment {getFlagAssignment :: Map.Map FlagName (Int, Bool)}
-  deriving (Binary, Generic, NFData, Typeable)
+  deriving (Binary, Generic, NFData)
 
 instance Structured FlagAssignment
 
diff --git a/src/Distribution/Types/ForeignLib.hs b/src/Distribution/Types/ForeignLib.hs
--- a/src/Distribution/Types/ForeignLib.hs
+++ b/src/Distribution/Types/ForeignLib.hs
@@ -61,9 +61,9 @@
   -- This is a list rather than a maybe field so that we can flatten
   -- the condition trees (for instance, when creating an sdist)
   }
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
-data LibVersionInfo = LibVersionInfo Int Int Int deriving (Data, Eq, Generic, Typeable)
+data LibVersionInfo = LibVersionInfo Int Int Int deriving (Data, Eq, Generic)
 
 instance Ord LibVersionInfo where
   LibVersionInfo c r _ `compare` LibVersionInfo c' r' _ =
diff --git a/src/Distribution/Types/ForeignLibOption.hs b/src/Distribution/Types/ForeignLibOption.hs
--- a/src/Distribution/Types/ForeignLibOption.hs
+++ b/src/Distribution/Types/ForeignLibOption.hs
@@ -22,7 +22,7 @@
     -- This option is compulsory on Windows and unsupported
     -- on other platforms.
     ForeignLibStandalone
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Pretty ForeignLibOption where
   pretty ForeignLibStandalone = Disp.text "standalone"
diff --git a/src/Distribution/Types/ForeignLibType.hs b/src/Distribution/Types/ForeignLibType.hs
--- a/src/Distribution/Types/ForeignLibType.hs
+++ b/src/Distribution/Types/ForeignLibType.hs
@@ -27,7 +27,7 @@
     ForeignLibNativeStatic
   | -- TODO: Maybe this should record a string?
     ForeignLibTypeUnknown
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Pretty ForeignLibType where
   pretty ForeignLibNativeShared = Disp.text "native-shared"
diff --git a/src/Distribution/Types/GenericPackageDescription.hs b/src/Distribution/Types/GenericPackageDescription.hs
--- a/src/Distribution/Types/GenericPackageDescription.hs
+++ b/src/Distribution/Types/GenericPackageDescription.hs
@@ -71,7 +71,7 @@
            )
          ]
   }
-  deriving (Show, Eq, Typeable, Data, Generic)
+  deriving (Show, Eq, Data, Generic)
 
 instance Package GenericPackageDescription where
   packageId = packageId . packageDescription
diff --git a/src/Distribution/Types/IncludeRenaming.hs b/src/Distribution/Types/IncludeRenaming.hs
--- a/src/Distribution/Types/IncludeRenaming.hs
+++ b/src/Distribution/Types/IncludeRenaming.hs
@@ -26,7 +26,7 @@
   { includeProvidesRn :: ModuleRenaming
   , includeRequiresRn :: ModuleRenaming
   }
-  deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
+  deriving (Show, Read, Eq, Ord, Data, Generic)
 
 instance Binary IncludeRenaming
 instance Structured IncludeRenaming
diff --git a/src/Distribution/Types/InstalledPackageInfo.hs b/src/Distribution/Types/InstalledPackageInfo.hs
--- a/src/Distribution/Types/InstalledPackageInfo.hs
+++ b/src/Distribution/Types/InstalledPackageInfo.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE TypeFamilies #-}
@@ -95,7 +94,7 @@
   , haddockHTMLs :: [FilePath]
   , pkgRoot :: Maybe FilePath
   }
-  deriving (Eq, Generic, Typeable, Read, Show)
+  deriving (Eq, Generic, Read, Show)
 
 instance Binary InstalledPackageInfo
 instance Structured InstalledPackageInfo
diff --git a/src/Distribution/Types/LegacyExeDependency.hs b/src/Distribution/Types/LegacyExeDependency.hs
--- a/src/Distribution/Types/LegacyExeDependency.hs
+++ b/src/Distribution/Types/LegacyExeDependency.hs
@@ -26,7 +26,7 @@
   = LegacyExeDependency
       String
       VersionRange
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary LegacyExeDependency
 instance Structured LegacyExeDependency
diff --git a/src/Distribution/Types/Library.hs b/src/Distribution/Types/Library.hs
--- a/src/Distribution/Types/Library.hs
+++ b/src/Distribution/Types/Library.hs
@@ -31,7 +31,7 @@
   -- ^ Whether this multilib can be used as a dependency for other packages.
   , libBuildInfo :: BuildInfo
   }
-  deriving (Generic, Show, Eq, Ord, Read, Typeable, Data)
+  deriving (Generic, Show, Eq, Ord, Read, Data)
 
 instance L.HasBuildInfo Library where
   buildInfo f l = (\x -> l{libBuildInfo = x}) <$> f (libBuildInfo l)
diff --git a/src/Distribution/Types/LibraryName.hs b/src/Distribution/Types/LibraryName.hs
--- a/src/Distribution/Types/LibraryName.hs
+++ b/src/Distribution/Types/LibraryName.hs
@@ -27,7 +27,7 @@
 data LibraryName
   = LMainLibName
   | LSubLibName UnqualComponentName
-  deriving (Eq, Generic, Ord, Read, Show, Typeable, Data)
+  deriving (Eq, Generic, Ord, Read, Show, Data)
 
 instance Binary LibraryName
 instance Structured LibraryName
diff --git a/src/Distribution/Types/LibraryVisibility.hs b/src/Distribution/Types/LibraryVisibility.hs
--- a/src/Distribution/Types/LibraryVisibility.hs
+++ b/src/Distribution/Types/LibraryVisibility.hs
@@ -23,7 +23,7 @@
     LibraryVisibilityPublic
   | -- | Internal library, default
     LibraryVisibilityPrivate
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Pretty LibraryVisibility where
   pretty LibraryVisibilityPublic = Disp.text "public"
diff --git a/src/Distribution/Types/Mixin.hs b/src/Distribution/Types/Mixin.hs
--- a/src/Distribution/Types/Mixin.hs
+++ b/src/Distribution/Types/Mixin.hs
@@ -31,7 +31,7 @@
   , mixinLibraryName :: LibraryName
   , mixinIncludeRenaming :: IncludeRenaming
   }
-  deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
+  deriving (Show, Read, Eq, Ord, Data, Generic)
 
 instance Binary Mixin
 instance Structured Mixin
diff --git a/src/Distribution/Types/Module.hs b/src/Distribution/Types/Module.hs
--- a/src/Distribution/Types/Module.hs
+++ b/src/Distribution/Types/Module.hs
@@ -26,7 +26,7 @@
 -- the 'InstalledPackageInfo'.
 data Module
   = Module DefUnitId ModuleName
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary Module
 instance Structured Module
diff --git a/src/Distribution/Types/ModuleReexport.hs b/src/Distribution/Types/ModuleReexport.hs
--- a/src/Distribution/Types/ModuleReexport.hs
+++ b/src/Distribution/Types/ModuleReexport.hs
@@ -24,7 +24,7 @@
   , moduleReexportOriginalName :: ModuleName
   , moduleReexportName :: ModuleName
   }
-  deriving (Eq, Ord, Generic, Read, Show, Typeable, Data)
+  deriving (Eq, Ord, Generic, Read, Show, Data)
 
 instance Binary ModuleReexport
 instance Structured ModuleReexport
diff --git a/src/Distribution/Types/ModuleRenaming.hs b/src/Distribution/Types/ModuleRenaming.hs
--- a/src/Distribution/Types/ModuleRenaming.hs
+++ b/src/Distribution/Types/ModuleRenaming.hs
@@ -40,7 +40,7 @@
   | -- | Hiding renaming, e.g., @hiding (A, B)@, bringing all
     -- exported modules into scope except the hidden ones.
     HidingRenaming [ModuleName]
-  deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
+  deriving (Show, Read, Eq, Ord, Data, Generic)
 
 -- | Interpret a 'ModuleRenaming' as a partial map from 'ModuleName'
 -- to 'ModuleName'.  For efficiency, you should partially apply it
diff --git a/src/Distribution/Types/MungedPackageId.hs b/src/Distribution/Types/MungedPackageId.hs
--- a/src/Distribution/Types/MungedPackageId.hs
+++ b/src/Distribution/Types/MungedPackageId.hs
@@ -28,7 +28,7 @@
   , mungedVersion :: Version
   -- ^ The version of this package / component, eg 1.2
   }
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary MungedPackageId
 instance Structured MungedPackageId
diff --git a/src/Distribution/Types/MungedPackageName.hs b/src/Distribution/Types/MungedPackageName.hs
--- a/src/Distribution/Types/MungedPackageName.hs
+++ b/src/Distribution/Types/MungedPackageName.hs
@@ -31,7 +31,7 @@
 --
 -- @since 2.0.0.2
 data MungedPackageName = MungedPackageName !PackageName !LibraryName
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary MungedPackageName
 instance Structured MungedPackageName
diff --git a/src/Distribution/Types/PackageDescription.hs b/src/Distribution/Types/PackageDescription.hs
--- a/src/Distribution/Types/PackageDescription.hs
+++ b/src/Distribution/Types/PackageDescription.hs
@@ -151,7 +151,7 @@
   , extraDocFiles :: [RelativePath Pkg File]
   , extraFiles :: [RelativePath Pkg File]
   }
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary PackageDescription
 instance Structured PackageDescription
diff --git a/src/Distribution/Types/PackageId.hs b/src/Distribution/Types/PackageId.hs
--- a/src/Distribution/Types/PackageId.hs
+++ b/src/Distribution/Types/PackageId.hs
@@ -28,7 +28,7 @@
   , pkgVersion :: Version
   -- ^ the version of this package, eg 1.2
   }
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary PackageIdentifier
 instance Structured PackageIdentifier
diff --git a/src/Distribution/Types/PackageName.hs b/src/Distribution/Types/PackageName.hs
--- a/src/Distribution/Types/PackageName.hs
+++ b/src/Distribution/Types/PackageName.hs
@@ -27,7 +27,7 @@
 --
 -- @since 2.0.0.2
 newtype PackageName = PackageName ShortText
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 -- | Convert 'PackageName' to 'String'
 unPackageName :: PackageName -> String
diff --git a/src/Distribution/Types/PackageVersionConstraint.hs b/src/Distribution/Types/PackageVersionConstraint.hs
--- a/src/Distribution/Types/PackageVersionConstraint.hs
+++ b/src/Distribution/Types/PackageVersionConstraint.hs
@@ -26,7 +26,7 @@
 -- There are a few places in the codebase where 'Dependency' was used where
 -- 'PackageVersionConstraint' is not used instead (#5570).
 data PackageVersionConstraint = PackageVersionConstraint PackageName VersionRange
-  deriving (Generic, Read, Show, Eq, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Data)
 
 instance Binary PackageVersionConstraint
 instance Structured PackageVersionConstraint
diff --git a/src/Distribution/Types/PkgconfigDependency.hs b/src/Distribution/Types/PkgconfigDependency.hs
--- a/src/Distribution/Types/PkgconfigDependency.hs
+++ b/src/Distribution/Types/PkgconfigDependency.hs
@@ -23,7 +23,7 @@
   = PkgconfigDependency
       PkgconfigName
       PkgconfigVersionRange
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary PkgconfigDependency
 instance Structured PkgconfigDependency
diff --git a/src/Distribution/Types/PkgconfigName.hs b/src/Distribution/Types/PkgconfigName.hs
--- a/src/Distribution/Types/PkgconfigName.hs
+++ b/src/Distribution/Types/PkgconfigName.hs
@@ -24,7 +24,7 @@
 --
 -- @since 2.0.0.2
 newtype PkgconfigName = PkgconfigName ShortText
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 -- | Convert 'PkgconfigName' to 'String'
 --
diff --git a/src/Distribution/Types/PkgconfigVersion.hs b/src/Distribution/Types/PkgconfigVersion.hs
--- a/src/Distribution/Types/PkgconfigVersion.hs
+++ b/src/Distribution/Types/PkgconfigVersion.hs
@@ -26,7 +26,7 @@
 --
 -- @since 3.0
 newtype PkgconfigVersion = PkgconfigVersion BS.ByteString
-  deriving (Generic, Read, Show, Typeable, Data)
+  deriving (Generic, Read, Show, Data)
 
 instance Eq PkgconfigVersion where
   PkgconfigVersion a == PkgconfigVersion b = rpmvercmp a b == EQ
diff --git a/src/Distribution/Types/PkgconfigVersionRange.hs b/src/Distribution/Types/PkgconfigVersionRange.hs
--- a/src/Distribution/Types/PkgconfigVersionRange.hs
+++ b/src/Distribution/Types/PkgconfigVersionRange.hs
@@ -37,7 +37,7 @@
   | PcOrEarlierVersion PkgconfigVersion -- =< version
   | PcUnionVersionRanges PkgconfigVersionRange PkgconfigVersionRange
   | PcIntersectVersionRanges PkgconfigVersionRange PkgconfigVersionRange
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
+  deriving (Generic, Read, Show, Eq, Ord, Data)
 
 instance Binary PkgconfigVersionRange
 instance Structured PkgconfigVersionRange
diff --git a/src/Distribution/Types/SetupBuildInfo.hs b/src/Distribution/Types/SetupBuildInfo.hs
--- a/src/Distribution/Types/SetupBuildInfo.hs
+++ b/src/Distribution/Types/SetupBuildInfo.hs
@@ -25,7 +25,7 @@
   -- internally, and doesn't correspond to anything in the .cabal
   -- file. See #3199.
   }
-  deriving (Generic, Show, Eq, Ord, Read, Typeable, Data)
+  deriving (Generic, Show, Eq, Ord, Read, Data)
 
 instance Binary SetupBuildInfo
 instance Structured SetupBuildInfo
diff --git a/src/Distribution/Types/SourceRepo.hs b/src/Distribution/Types/SourceRepo.hs
--- a/src/Distribution/Types/SourceRepo.hs
+++ b/src/Distribution/Types/SourceRepo.hs
@@ -77,7 +77,7 @@
   -- relative to the root of the repository. This field is optional. If not
   -- given the default is \".\" ie no subdirectory.
   }
-  deriving (Eq, Ord, Generic, Read, Show, Typeable, Data)
+  deriving (Eq, Ord, Generic, Read, Show, Data)
 
 emptySourceRepo :: RepoKind -> SourceRepo
 emptySourceRepo kind =
@@ -106,7 +106,7 @@
     -- information to re-create the exact sources.
     RepoThis
   | RepoKindUnknown String
-  deriving (Eq, Generic, Ord, Read, Show, Typeable, Data)
+  deriving (Eq, Generic, Ord, Read, Show, Data)
 
 instance Binary RepoKind
 instance Structured RepoKind
@@ -126,7 +126,7 @@
   | Monotone
   | -- | @since 3.4.0.0
     Pijul
-  deriving (Eq, Generic, Ord, Read, Show, Typeable, Data, Enum, Bounded)
+  deriving (Eq, Generic, Ord, Read, Show, Data, Enum, Bounded)
 
 instance Binary KnownRepoType
 instance Structured KnownRepoType
@@ -146,7 +146,7 @@
 data RepoType
   = KnownRepoType KnownRepoType
   | OtherRepoType String
-  deriving (Eq, Generic, Ord, Read, Show, Typeable, Data)
+  deriving (Eq, Generic, Ord, Read, Show, Data)
 
 instance Binary RepoType
 instance Structured RepoType
diff --git a/src/Distribution/Types/TestSuite.hs b/src/Distribution/Types/TestSuite.hs
--- a/src/Distribution/Types/TestSuite.hs
+++ b/src/Distribution/Types/TestSuite.hs
@@ -28,7 +28,7 @@
   , testBuildInfo :: BuildInfo
   , testCodeGenerators :: [String]
   }
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance L.HasBuildInfo TestSuite where
   buildInfo f l = (\x -> l{testBuildInfo = x}) <$> f (testBuildInfo l)
diff --git a/src/Distribution/Types/TestSuiteInterface.hs b/src/Distribution/Types/TestSuiteInterface.hs
--- a/src/Distribution/Types/TestSuiteInterface.hs
+++ b/src/Distribution/Types/TestSuiteInterface.hs
@@ -30,7 +30,7 @@
   | -- | A test suite that does not conform to one of the above interfaces for
     -- the given reason (e.g. unknown test type).
     TestSuiteUnsupported TestType
-  deriving (Eq, Ord, Generic, Read, Show, Typeable, Data)
+  deriving (Eq, Ord, Generic, Read, Show, Data)
 
 instance Binary TestSuiteInterface
 instance Structured TestSuiteInterface
diff --git a/src/Distribution/Types/TestType.hs b/src/Distribution/Types/TestType.hs
--- a/src/Distribution/Types/TestType.hs
+++ b/src/Distribution/Types/TestType.hs
@@ -25,7 +25,7 @@
     TestTypeLib Version
   | -- | Some unknown test type e.g. \"type: foo\"
     TestTypeUnknown String Version
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary TestType
 instance Structured TestType
diff --git a/src/Distribution/Types/UnitId.hs b/src/Distribution/Types/UnitId.hs
--- a/src/Distribution/Types/UnitId.hs
+++ b/src/Distribution/Types/UnitId.hs
@@ -64,7 +64,7 @@
 -- flag, use the 'display' function, which will work on all
 -- versions of Cabal.
 newtype UnitId = UnitId ShortText
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data, NFData)
+  deriving (Generic, Read, Show, Eq, Ord, Data, NFData)
 
 instance Binary UnitId
 instance Structured UnitId
@@ -118,7 +118,7 @@
 -- that a 'UnitId' identified this way is definite; i.e., it has no
 -- unfilled holes.
 newtype DefUnitId = DefUnitId {unDefUnitId :: UnitId}
-  deriving (Generic, Read, Show, Eq, Ord, Typeable, Data, Binary, NFData, Pretty)
+  deriving (Generic, Read, Show, Eq, Ord, Data, Binary, NFData, Pretty)
 
 instance Structured DefUnitId
 
diff --git a/src/Distribution/Types/UnqualComponentName.hs b/src/Distribution/Types/UnqualComponentName.hs
--- a/src/Distribution/Types/UnqualComponentName.hs
+++ b/src/Distribution/Types/UnqualComponentName.hs
@@ -33,7 +33,6 @@
     , Show
     , Eq
     , Ord
-    , Typeable
     , Data
     , Semigroup
     , Monoid -- TODO: bad enabler of bad monoids
diff --git a/src/Distribution/Types/Version.hs b/src/Distribution/Types/Version.hs
--- a/src/Distribution/Types/Version.hs
+++ b/src/Distribution/Types/Version.hs
@@ -47,7 +47,7 @@
   -- which all fall into the [0..0xfffe] range), then PV0
   -- MUST be used. This is essential for the 'Eq' instance
   -- to work.
-  deriving (Data, Eq, Generic, Typeable)
+  deriving (Data, Eq, Generic)
 
 instance Ord Version where
   compare (PV0 x) (PV0 y) = compare x y
diff --git a/src/Distribution/Types/VersionInterval.hs b/src/Distribution/Types/VersionInterval.hs
--- a/src/Distribution/Types/VersionInterval.hs
+++ b/src/Distribution/Types/VersionInterval.hs
@@ -1,5 +1,4 @@
 {-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE DeriveDataTypeable #-}
 
 -- | This module implements a view of a 'VersionRange' as a finite
 -- list of separated version intervals.
@@ -65,7 +64,7 @@
 -- predicates for translation into foreign packaging systems that do not
 -- support complex version range expressions.
 newtype VersionIntervals = VersionIntervals [VersionInterval]
-  deriving (Eq, Show, Typeable)
+  deriving (Eq, Show)
 
 -- | Inspect the list of version intervals.
 unVersionIntervals :: VersionIntervals -> [VersionInterval]
diff --git a/src/Distribution/Types/VersionInterval/Legacy.hs b/src/Distribution/Types/VersionInterval/Legacy.hs
--- a/src/Distribution/Types/VersionInterval/Legacy.hs
+++ b/src/Distribution/Types/VersionInterval/Legacy.hs
@@ -1,5 +1,3 @@
-{-# LANGUAGE DeriveDataTypeable #-}
-
 -- | This module implements a view of a 'VersionRange' as a finite
 -- list of separated version intervals and provides the Boolean
 -- algebra operations union, intersection, and complement.
@@ -96,7 +94,7 @@
 -- predicates for translation into foreign packaging systems that do not
 -- support complex version range expressions.
 newtype VersionIntervals = VersionIntervals [VersionInterval]
-  deriving (Eq, Show, Typeable)
+  deriving (Eq, Show)
 
 -- | Inspect the list of version intervals.
 versionIntervals :: VersionIntervals -> [VersionInterval]
diff --git a/src/Distribution/Types/VersionRange.hs b/src/Distribution/Types/VersionRange.hs
--- a/src/Distribution/Types/VersionRange.hs
+++ b/src/Distribution/Types/VersionRange.hs
@@ -1,7 +1,26 @@
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE ViewPatterns #-}
+
 module Distribution.Types.VersionRange
-  ( -- * Version ranges
+  ( -- * Version Range
     VersionRange
 
+    -- ** Predicates
+    -- $predicate-examples
+
+    -- *** Lower Bound
+  , hasLowerBound
+  , hasGTLowerBound
+
+    -- *** Upper Bound
+  , hasUpperBound
+  , hasLEUpperBound
+  , hasTrailingZeroUpperBound
+
+    -- *** Any Version
+  , isAnyVersion
+  , isAnyVersionLight
+
     -- ** Constructing
   , anyVersion
   , noVersion
@@ -16,32 +35,31 @@
   , withinVersion
   , majorBoundVersion
 
-    -- ** Inspection
+    -- ** Modification
+  , normaliseVersionRange
+  , stripParensVersionRange
 
-  --
-  -- See "Distribution.Version" for more utilities.
+    -- ** Inspection
   , withinRange
   , foldVersionRange
-  , normaliseVersionRange
-  , stripParensVersionRange
-  , hasUpperBound
-  , hasLowerBound
 
-    -- ** Cata & ana
+    -- ** Parser
+  , versionRangeParser
+
+    -- * Version F-Algebra
   , VersionRangeF (..)
+  , projectVersionRange
+  , embedVersionRange
   , cataVersionRange
   , anaVersionRange
   , hyloVersionRange
-  , projectVersionRange
-  , embedVersionRange
 
-    -- ** Utilities
-  , isAnyVersion
-  , isAnyVersionLight
+    -- * Version Utilities
+
+  -- See "Distribution.Version" for more utilities.
   , wildcardUpperBound
   , majorUpperBound
   , isWildcardRange
-  , versionRangeParser
   ) where
 
 import Distribution.Compat.Prelude
@@ -172,6 +190,9 @@
 -- | Does the version range have an upper bound?
 --
 -- @since 1.24.0.0
+--
+-- >>> forM ["< 1", ">= 0 && < 1", ">= 0 || < 1", "^>= 4.20.0.0"] (fmap hasUpperBound . simpleParsec)
+-- Just [True,True,False,True]
 hasUpperBound :: VersionRange -> Bool
 hasUpperBound =
   foldVersionRange
@@ -188,6 +209,9 @@
 -- the implicit >=0 lower bound.
 --
 -- @since 1.24.0.0
+--
+-- >>> forM ["< 1", ">= 0 && < 1", ">= 0 || < 1", "^>= 4.20.0.0"] (fmap hasLowerBound . simpleParsec)
+-- Just [False,True,False,True]
 hasLowerBound :: VersionRange -> Bool
 hasLowerBound =
   foldVersionRange
@@ -197,3 +221,50 @@
     (const False)
     (&&)
     (||)
+
+-- | Is the upper bound version range (less than or equal (LE, <=)?
+--
+-- >>> forM ["< 1", "<= 1", ">= 0 && < 1", ">= 0 || < 1", ">= 0 && <= 1", ">= 0 || <= 1", "^>= 4.20.0.0"] (fmap hasLEUpperBound . simpleParsec)
+-- Just [False,True,False,False,True,True,False]
+hasLEUpperBound :: VersionRange -> Bool
+hasLEUpperBound = queryVersionRange (\case LEUpperBound -> True; _ -> False) hasLEUpperBound
+
+-- | Is the lower bound version range greater than (GT, >)?
+--
+-- >>> forM ["< 1", ">= 0 && < 1", ">= 0 || < 1", "> 0 && < 1", "> 0 || < 1", "^>= 4.20.0.0"] (fmap hasGTLowerBound . simpleParsec)
+-- Just [False,False,False,True,True,False]
+hasGTLowerBound :: VersionRange -> Bool
+hasGTLowerBound = queryVersionRange (\case GTLowerBound -> True; _ -> False) hasGTLowerBound
+
+-- | Does the upper bound version range have a trailing zero?
+--
+-- >>> forM ["< 1", "< 1.1", "< 1.0", "< 1.1.0", "^>= 4.20.0.0"] (fmap hasTrailingZeroUpperBound . simpleParsec)
+-- Just [False,False,True,True,False]
+hasTrailingZeroUpperBound :: VersionRange -> Bool
+hasTrailingZeroUpperBound = queryVersionRange (\case TZUpperBound -> True; _ -> False) hasTrailingZeroUpperBound
+
+queryVersionRange :: (VersionRangeF VersionRange -> Bool) -> (VersionRange -> Bool) -> VersionRange -> Bool
+queryVersionRange pf p (projectVersionRange -> v) =
+  let f = queryVersionRange pf p
+   in pf v || case v of
+        IntersectVersionRangesF x y -> f x || f y
+        UnionVersionRangesF x y -> f x || f y
+        _ -> False
+
+-- $setup
+-- >>> import Distribution.Parsec
+-- >>> import Data.Traversable
+
+-- $predicate-examples
+--
+-- The parsed 'VersionRange' of each version constraint used in the examples for
+-- 'hasUpperBound' and 'hasLowerBound' are:
+--
+-- >>> simpleParsec "< 1" :: Maybe VersionRange
+-- Just (EarlierVersion (mkVersion [1]))
+-- >>> simpleParsec ">= 0 && < 1" :: Maybe VersionRange
+-- Just (IntersectVersionRanges (OrLaterVersion (mkVersion [0])) (EarlierVersion (mkVersion [1])))
+-- >>> simpleParsec ">= 0 || < 1" :: Maybe VersionRange
+-- Just (UnionVersionRanges (OrLaterVersion (mkVersion [0])) (EarlierVersion (mkVersion [1])))
+-- >>> simpleParsec "^>= 4.20.0.0" :: Maybe VersionRange
+-- Just (MajorBoundVersion (mkVersion [4,20,0,0]))
diff --git a/src/Distribution/Types/VersionRange/Internal.hs b/src/Distribution/Types/VersionRange/Internal.hs
--- a/src/Distribution/Types/VersionRange/Internal.hs
+++ b/src/Distribution/Types/VersionRange/Internal.hs
@@ -5,7 +5,9 @@
 {-# LANGUAGE DeriveTraversable #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE PatternSynonyms #-}
 {-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE ViewPatterns #-}
 
 -- | The only purpose of this module is to prevent the export of
 -- 'VersionRange' constructors from
@@ -25,7 +27,7 @@
   , intersectVersionRanges
   , withinVersion
   , majorBoundVersion
-  , VersionRangeF (..)
+  , VersionRangeF (.., LEUpperBound, GTLowerBound, TZUpperBound)
   , projectVersionRange
   , embedVersionRange
   , cataVersionRange
@@ -58,7 +60,7 @@
   | MajorBoundVersion Version -- @^>= ver@ (same as >= ver && < MAJ(ver)+1)
   | UnionVersionRanges VersionRange VersionRange
   | IntersectVersionRanges VersionRange VersionRange
-  deriving (Data, Eq, Ord, Generic, Read, Show, Typeable)
+  deriving (Data, Eq, Ord, Generic, Read, Show)
 
 instance Binary VersionRange
 instance Structured VersionRange
@@ -181,11 +183,26 @@
     , Generic
     , Read
     , Show
-    , Typeable
     , Functor
     , Foldable
     , Traversable
     )
+
+pattern LEUpperBound, GTLowerBound, TZUpperBound :: VersionRangeF a
+pattern LEUpperBound <- OrEarlierVersionF _
+pattern GTLowerBound <- LaterVersionF _
+pattern TZUpperBound <- (upperTrailingZero -> True)
+
+upperTrailingZero :: VersionRangeF a -> Bool
+upperTrailingZero (OrEarlierVersionF x) = trailingZero x
+upperTrailingZero (EarlierVersionF x) = trailingZero x
+upperTrailingZero _ = False
+
+trailingZero :: Version -> Bool
+trailingZero (versionNumbers -> vs)
+  | [0] <- vs = False
+  | 0 : _ <- reverse vs = True
+  | otherwise = False
 
 -- | Generic destructor for 'VersionRange'.
 --
diff --git a/src/Distribution/Utils/Generic.hs b/src/Distribution/Utils/Generic.hs
--- a/src/Distribution/Utils/Generic.hs
+++ b/src/Distribution/Utils/Generic.hs
@@ -1,11 +1,7 @@
 {-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE ScopedTypeVariables #-}
-
------------------------------------------------------------------------------
 
 -- |
 -- Module      :  Distribution.Utils.Generic
diff --git a/src/Distribution/Utils/Path.hs b/src/Distribution/Utils/Path.hs
--- a/src/Distribution/Utils/Path.hs
+++ b/src/Distribution/Utils/Path.hs
@@ -201,7 +201,7 @@
 -- until we interpret them (using e.g. 'interpretSymbolicPath').
 newtype SymbolicPathX (allowAbsolute :: AllowAbsolute) (from :: Type) (to :: FileOrDir)
   = SymbolicPath FilePath
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 type role SymbolicPathX nominal nominal nominal
 
diff --git a/src/Distribution/Utils/ShortText.hs b/src/Distribution/Utils/ShortText.hs
--- a/src/Distribution/Utils/ShortText.hs
+++ b/src/Distribution/Utils/ShortText.hs
@@ -93,7 +93,7 @@
 -- @since 2.0.0.2
 #if HAVE_SHORTBYTESTRING
 newtype ShortText = ST { unST :: BS.Short.ShortByteString }
-                  deriving (Eq,Ord,Generic,Data,Typeable)
+                  deriving (Eq,Ord,Generic,Data)
 
 # if MIN_VERSION_binary(0,8,1)
 instance Binary ShortText where
@@ -115,7 +115,7 @@
 null = BS.Short.null . unST
 #else
 newtype ShortText = ST { unST :: String }
-                  deriving (Eq,Ord,Generic,Data,Typeable)
+                  deriving (Eq,Ord,Generic,Data)
 
 instance Binary ShortText where
     put = put . encodeStringUtf8 . unST
diff --git a/src/Distribution/Version.hs b/src/Distribution/Version.hs
--- a/src/Distribution/Version.hs
+++ b/src/Distribution/Version.hs
@@ -50,6 +50,9 @@
   , stripParensVersionRange
   , hasUpperBound
   , hasLowerBound
+  , hasLEUpperBound
+  , hasTrailingZeroUpperBound
+  , hasGTLowerBound
 
     -- ** Cata & ana
   , VersionRangeF (..)
diff --git a/src/Language/Haskell/Extension.hs b/src/Language/Haskell/Extension.hs
--- a/src/Language/Haskell/Extension.hs
+++ b/src/Language/Haskell/Extension.hs
@@ -59,7 +59,7 @@
     GHC2024
   | -- | An unknown language, identified by its name.
     UnknownLanguage String
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary Language
 instance Structured Language
@@ -115,7 +115,7 @@
   | -- | An unknown extension, identified by the name of its @LANGUAGE@
     -- pragma.
     UnknownExtension String
-  deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Data)
 
 instance Binary Extension
 instance Structured Extension
@@ -556,7 +556,7 @@
   | -- | Allow use of or-pattern syntax, condensing multiple patterns
     -- into a single one.
     OrPatterns
-  deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Typeable, Data)
+  deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Data)
 
 instance Binary KnownExtension
 instance Structured KnownExtension
