diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 0.5.1.1 (2020-xx-yy)
+
+* Compatibility with GHC-9.0
+
 # 0.5.1.0 (2020-03-29)
 
 * Compatibility with GHC-8.10 (thanks to Ryan Scott).
diff --git a/generics-sop.cabal b/generics-sop.cabal
--- a/generics-sop.cabal
+++ b/generics-sop.cabal
@@ -1,5 +1,5 @@
 name:                generics-sop
-version:             0.5.1.0
+version:             0.5.1.1
 synopsis:            Generic Programming using True Sums of Products
 description:
   A library to support the definition of generic functions.
@@ -42,7 +42,7 @@
 build-type:          Simple
 cabal-version:       >=1.10
 extra-source-files:  CHANGELOG.md doctest.sh
-tested-with:         GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.2, GHC == 8.10.1
+tested-with:         GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.2, GHC == 8.10.4, GHC == 9.0.1
 
 source-repository head
   type:                git
@@ -65,11 +65,11 @@
                        Generics.SOP.NP
                        Generics.SOP.NS
                        Generics.SOP.Sing
-  build-depends:       base                 >= 4.9  && < 4.15,
+  build-depends:       base                 >= 4.9  && < 4.16,
                        sop-core             == 0.5.0.*,
-                       template-haskell     >= 2.8  && < 2.17,
-                       th-abstraction       >= 0.3  && < 0.4,
-                       ghc-prim             >= 0.3  && < 0.7
+                       template-haskell     >= 2.8  && < 2.18,
+                       th-abstraction       >= 0.4  && < 0.5,
+                       ghc-prim             >= 0.3  && < 0.8
   hs-source-dirs:      src
   default-language:    Haskell2010
   ghc-options:         -Wall
diff --git a/src/Generics/SOP/Instances.hs b/src/Generics/SOP/Instances.hs
--- a/src/Generics/SOP/Instances.hs
+++ b/src/Generics/SOP/Instances.hs
@@ -262,7 +262,9 @@
 deriveGeneric ''RuntimeRep -- new
 deriveGeneric ''VecCount -- new
 deriveGeneric ''VecElem -- new
+#if !MIN_VERSION_base(4,15,0)
 deriveGeneric ''SpecConstrAnnotation -- new
+#endif
 
 -- From GHC.Generics:
 deriveGeneric ''GHC.Generics.K1 -- new
diff --git a/src/Generics/SOP/TH.hs b/src/Generics/SOP/TH.hs
--- a/src/Generics/SOP/TH.hs
+++ b/src/Generics/SOP/TH.hs
@@ -14,6 +14,9 @@
 import Data.List (foldl')
 import Data.Maybe (fromMaybe)
 import Data.Proxy
+
+-- importing in this order to avoid unused import warning
+import Language.Haskell.TH.Datatype.TyVarBndr
 import Language.Haskell.TH
 import Language.Haskell.TH.Datatype as TH
 
@@ -186,14 +189,14 @@
       [ tySynD datatypeInfoName' [] (metadataType' variant name cons) ]
 
 deriveGenericForDataDec ::
-  (Name -> Q Type) -> DatatypeVariant -> Cxt -> Name -> [TyVarBndr] -> [Type] -> [TH.ConstructorInfo] -> Q [Dec]
+  (Name -> Q Type) -> DatatypeVariant -> Cxt -> Name -> [TyVarBndrUnit] -> [Type] -> [TH.ConstructorInfo] -> Q [Dec]
 deriveGenericForDataDec f _variant _cxt name _bndrs instTys cons = do
   let typ = appTysSubst f name instTys
   deriveGenericForDataType f typ cons
 
 deriveGenericForDataType :: (Name -> Q Type) -> Q Type -> [TH.ConstructorInfo] -> Q [Dec]
 deriveGenericForDataType f typ cons = do
-  let codeSyn = tySynInstDCompat ''Code Nothing [typ] (codeFor f cons)
+  let codeSyn = tySynInstDCompat ''Generics.SOP.Universe.Code Nothing [typ] (codeFor f cons)
   inst <- instanceD
             (cxt [])
             [t| Generic $typ |]
@@ -201,7 +204,7 @@
   return [inst]
 
 deriveMetadataForDataDec ::
-  (Name -> Q Type) -> DatatypeVariant -> Cxt -> Name -> [TyVarBndr] -> [Type] -> [TH.ConstructorInfo] -> Q [Dec]
+  (Name -> Q Type) -> DatatypeVariant -> Cxt -> Name -> [TyVarBndrUnit] -> [Type] -> [TH.ConstructorInfo] -> Q [Dec]
 deriveMetadataForDataDec f variant _cxt name _bndrs instTys cons = do
   let typ = appTysSubst f name instTys
   deriveMetadataForDataType variant name typ cons
@@ -508,7 +511,7 @@
 appsT :: Name -> [Q Type] -> Q Type
 appsT n = foldl' appT (conT n)
 
-appTyVars :: (Name -> Q Type) -> Name -> [TyVarBndr] -> Q Type
+appTyVars :: (Name -> Q Type) -> Name -> [TyVarBndrUnit] -> Q Type
 appTyVars f n bndrs =
   appsT n (map (f . tvName) bndrs)
 
@@ -545,7 +548,7 @@
                    -- The datatype context
                 -> Name
                    -- The data type's name
-                -> [TyVarBndr]
+                -> [TyVarBndrUnit]
                    -- The datatype's type variable binders, both implicit and explicit.
                    -- Examples:
                    --
