diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,5 +1,13 @@
 # Changelog for the `parameterized-utils` package
 
+## 2.1.7.0 -- *2023 Jul 28*
+
+  * Add support for GHC 9.6.
+  * Allow building with `base-orphans-0.9.*`, `mtl-2.3.*`, and
+    `th-abstraction-0.5.*`.
+  * Mark `Data.Parameterized.ClassesC` as `Trustworthy` to restore the ability
+    to build `parameterized-utils` with versions of `lens` older than `lens-5`.
+
 ## 2.1.6.0 -- *2022 Dec 18*
 
   * Added `FinMap`: an integer map with a statically-known maximum size.
diff --git a/parameterized-utils.cabal b/parameterized-utils.cabal
--- a/parameterized-utils.cabal
+++ b/parameterized-utils.cabal
@@ -1,6 +1,6 @@
 Cabal-version: 2.2
 Name:          parameterized-utils
-Version:       2.1.6.0
+Version:       2.1.7.0
 Author:        Galois Inc.
 Maintainer:    kquick@galois.com
 stability:     stable
@@ -43,6 +43,7 @@
                -Werror=incomplete-patterns
                -Werror=missing-methods
                -Werror=overlapping-patterns
+               -Wno-trustworthy-safe
                -fhide-source-paths
   default-language: Haskell2010
 
@@ -50,8 +51,8 @@
 library
   import: bldflags
   build-depends: base >= 4.10 && < 5
-               , base-orphans   >=0.8.2 && <0.9
-               , th-abstraction >=0.4.2 && <0.5
+               , base-orphans   >=0.8.2 && <0.10
+               , th-abstraction >=0.4.2 && <0.6
                , constraints    >=0.10 && <0.14
                , containers
                , deepseq
diff --git a/src/Data/Parameterized/ClassesC.hs b/src/Data/Parameterized/ClassesC.hs
--- a/src/Data/Parameterized/ClassesC.hs
+++ b/src/Data/Parameterized/ClassesC.hs
@@ -17,7 +17,7 @@
 
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE RankNTypes #-}
-{-# LANGUAGE Safe #-}
+{-# LANGUAGE Trustworthy #-}
 {-# LANGUAGE TypeOperators #-}
 
 module Data.Parameterized.ClassesC
diff --git a/src/Data/Parameterized/Context.hs b/src/Data/Parameterized/Context.hs
--- a/src/Data/Parameterized/Context.hs
+++ b/src/Data/Parameterized/Context.hs
@@ -102,7 +102,7 @@
 
 import           Prelude hiding (unzip)
 
-import           Control.Applicative (liftA2)
+import qualified Control.Applicative as App (liftA2)
 import           Control.Lens hiding (Index, (:>), Empty)
 import           Data.Functor (void)
 import           Data.Functor.Product (Product(Pair))
@@ -458,7 +458,7 @@
   fmap _ (Collector x) = Collector x
 instance (Applicative m, Monoid w) => Applicative (Collector m w) where
   pure _ = Collector (pure mempty)
-  Collector x <*> Collector y = Collector (liftA2 (<>) x y)
+  Collector x <*> Collector y = Collector (App.liftA2 (<>) x y)
 
 -- | Visit each of the elements in an @Assignment@ in order
 --   from left to right and collect the results using the provided @Monoid@.
diff --git a/src/Data/Parameterized/Context/Safe.hs b/src/Data/Parameterized/Context/Safe.hs
--- a/src/Data/Parameterized/Context/Safe.hs
+++ b/src/Data/Parameterized/Context/Safe.hs
@@ -40,10 +40,11 @@
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TypeFamilies #-}
-{-# LANGUAGE TypeInType #-}
 {-# LANGUAGE TypeOperators #-}
-{-# LANGUAGE TypeInType #-}
 {-# LANGUAGE StandaloneDeriving #-}
+#if __GLASGOW_HASKELL__ < 806
+{-# LANGUAGE TypeInType #-}
+#endif
 {-# OPTIONS_HADDOCK hide #-}
 module Data.Parameterized.Context.Safe
   ( module Data.Parameterized.Ctx
diff --git a/src/Data/Parameterized/Context/Unsafe.hs b/src/Data/Parameterized/Context/Unsafe.hs
--- a/src/Data/Parameterized/Context/Unsafe.hs
+++ b/src/Data/Parameterized/Context/Unsafe.hs
@@ -12,10 +12,11 @@
 {-# LANGUAGE Trustworthy #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
-{-# LANGUAGE TypeInType #-}
 {-# LANGUAGE UndecidableInstances #-}
 {-# LANGUAGE StandaloneDeriving #-}
+#if __GLASGOW_HASKELL__ < 806
 {-# LANGUAGE TypeInType #-}
+#endif
 {-# OPTIONS_HADDOCK hide #-}
 module Data.Parameterized.Context.Unsafe
   ( module Data.Parameterized.Ctx
diff --git a/src/Data/Parameterized/DecidableEq.hs b/src/Data/Parameterized/DecidableEq.hs
--- a/src/Data/Parameterized/DecidableEq.hs
+++ b/src/Data/Parameterized/DecidableEq.hs
@@ -9,14 +9,17 @@
 This is different from GHC's @TestEquality@ in that it provides evidence
 of non-equality. In fact, it is a superclass of @TestEquality@.
 -}
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE RankNTypes #-}
-{-# LANGUAGE TypeInType #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE Safe #-}
+#if __GLASGOW_HASKELL__ < 806
+{-# LANGUAGE TypeInType #-}
+#endif
 module Data.Parameterized.DecidableEq
   ( DecidableEq(..)
   ) where
diff --git a/src/Data/Parameterized/Map.hs b/src/Data/Parameterized/Map.hs
--- a/src/Data/Parameterized/Map.hs
+++ b/src/Data/Parameterized/Map.hs
@@ -19,7 +19,9 @@
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE Trustworthy #-}
 {-# LANGUAGE TypeFamilies #-}
+#if __GLASGOW_HASKELL__ < 806
 {-# LANGUAGE TypeInType #-}
+#endif
 module Data.Parameterized.Map
   ( MapF
     -- * Construction
@@ -81,7 +83,8 @@
 
 import           Control.Applicative hiding (empty)
 import           Control.Lens (Traversal', Lens')
-import           Control.Monad.Identity
+import           Control.Monad.Identity (Identity(..))
+import           Control.Monad (foldM)
 import           Data.Kind (Type)
 import           Data.List (intercalate, foldl')
 import           Data.Monoid
diff --git a/src/Data/Parameterized/NatRepr.hs b/src/Data/Parameterized/NatRepr.hs
--- a/src/Data/Parameterized/NatRepr.hs
+++ b/src/Data/Parameterized/NatRepr.hs
@@ -136,7 +136,9 @@
 import Data.Type.Equality as Equality
 import Data.Void as Void
 import Numeric.Natural
-import GHC.TypeNats as TypeNats
+import GHC.TypeNats ( KnownNat, Nat, SomeNat(..)
+                    , type (+), type (-), type (*), type (<=)
+                    , someNatVal )
 import Unsafe.Coerce
 
 import Data.Parameterized.Axiom
diff --git a/src/Data/Parameterized/Nonce.hs b/src/Data/Parameterized/Nonce.hs
--- a/src/Data/Parameterized/Nonce.hs
+++ b/src/Data/Parameterized/Nonce.hs
@@ -14,6 +14,7 @@
 (via 'unsafeCoerce') that the types ascribed to the nonces are equal
 if their values are equal.
 -}
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE ExistentialQuantification #-}
 {-# LANGUAGE EmptyDataDecls #-}
 {-# LANGUAGE GADTs #-}
@@ -23,7 +24,9 @@
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE RoleAnnotations #-}
 {-# LANGUAGE Trustworthy #-}
+#if __GLASGOW_HASKELL__ < 806
 {-# LANGUAGE TypeInType #-}
+#endif
 module Data.Parameterized.Nonce
   ( -- * NonceGenerator
     NonceGenerator
diff --git a/test/Test/NatRepr.hs b/test/Test/NatRepr.hs
--- a/test/Test/NatRepr.hs
+++ b/test/Test/NatRepr.hs
@@ -12,7 +12,7 @@
 
 import           Data.Parameterized.NatRepr
 import           Data.Parameterized.Some
-import           GHC.TypeLits
+import           GHC.TypeLits (natVal)
 
 prop_withKnownNat :: Property
 prop_withKnownNat = property $
