diff --git a/generics-sop/generics-sop.cabal b/generics-sop/generics-sop.cabal index c84ac93..1aaf199 100644 --- a/generics-sop/generics-sop.cabal +++ b/generics-sop/generics-sop.cabal @@ -42,7 +42,7 @@ category: Generics 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.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.7, GHC == 9.4.4, GHC == 9.6.1 +tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.7, GHC == 9.4.4, GHC == 9.6.1, GHC == 9.8.1 source-repository head type: git @@ -65,11 +65,11 @@ library Generics.SOP.NP Generics.SOP.NS Generics.SOP.Sing - build-depends: base >= 4.9 && < 4.19, + build-depends: base >= 4.9 && < 4.20, sop-core == 0.5.0.*, - template-haskell >= 2.8 && < 2.21, - th-abstraction >= 0.4 && < 0.6, - ghc-prim >= 0.3 && < 0.11 + template-haskell >= 2.8 && < 2.22, + th-abstraction >= 0.6 && < 0.7, + ghc-prim >= 0.3 && < 0.12 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall diff --git a/generics-sop/src/Generics/SOP/Instances.hs b/generics-sop/src/Generics/SOP/Instances.hs index 40db2c6..b5f7f97 100644 --- a/generics-sop/src/Generics/SOP/Instances.hs +++ b/generics-sop/src/Generics/SOP/Instances.hs @@ -1,5 +1,6 @@ {-# LANGUAGE EmptyCase #-} {-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE UnboxedTuples #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -freduction-depth=100 #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} diff --git a/generics-sop/src/Generics/SOP/TH.hs b/generics-sop/src/Generics/SOP/TH.hs index 1c66634..731bd01 100644 --- a/generics-sop/src/Generics/SOP/TH.hs +++ b/generics-sop/src/Generics/SOP/TH.hs @@ -20,6 +20,7 @@ import Data.Proxy import Language.Haskell.TH.Datatype.TyVarBndr import Language.Haskell.TH import Language.Haskell.TH.Datatype as TH +import Language.Haskell.TH.Datatype.TyVarBndr import Generics.SOP.BasicFunctors import qualified Generics.SOP.Metadata as SOP @@ -190,7 +191,7 @@ deriveMetadataType n datatypeInfoName = do [ tySynD datatypeInfoName' [] (metadataType' variant name cons) ] deriveGenericForDataDec :: - (Name -> Q Type) -> DatatypeVariant -> Cxt -> Name -> [TyVarBndrUnit] -> [Type] -> [TH.ConstructorInfo] -> Q [Dec] + (Name -> Q Type) -> DatatypeVariant -> Cxt -> Name -> [TyVarBndrVis] -> [Type] -> [TH.ConstructorInfo] -> Q [Dec] deriveGenericForDataDec f _variant _cxt name _bndrs instTys cons = do let typ = appTysSubst f name instTys deriveGenericForDataType f typ cons @@ -205,7 +206,7 @@ deriveGenericForDataType f typ cons = do return [inst] deriveMetadataForDataDec :: - (Name -> Q Type) -> DatatypeVariant -> Cxt -> Name -> [TyVarBndrUnit] -> [Type] -> [TH.ConstructorInfo] -> Q [Dec] + (Name -> Q Type) -> DatatypeVariant -> Cxt -> Name -> [TyVarBndrVis] -> [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 @@ -512,7 +513,7 @@ promotedTypeListSubst f (t:ts) = [t| $promotedConsT $(t >>= substType f) $(promo appsT :: Name -> [Q Type] -> Q Type appsT n = foldl' appT (conT n) -appTyVars :: (Name -> Q Type) -> Name -> [TyVarBndrUnit] -> Q Type +appTyVars :: (Name -> Q Type) -> Name -> [TyVarBndrVis] -> Q Type appTyVars f n bndrs = appsT n (map (f . tvName) bndrs) @@ -549,7 +550,7 @@ withDataDec :: TH.DatatypeInfo -- The datatype context -> Name -- The data type's name - -> [TyVarBndrUnit] + -> [TyVarBndrVis] -- The datatype's type variable binders, both implicit and explicit. -- Examples: -- @@ -582,7 +583,7 @@ withDataDec (TH.DatatypeInfo { datatypeContext = ctxt , datatypeVariant = variant , datatypeCons = cons }) f = checkForTypeData variant $ - f variant ctxt name bndrs instTypes cons + f variant ctxt name (changeTVFlags bndrReq bndrs) instTypes cons checkForTypeData :: DatatypeVariant -> Q a -> Q a checkForTypeData variant q = do diff --git a/sop-core/sop-core.cabal b/sop-core/sop-core.cabal index c31354c..7fad20a 100644 --- a/sop-core/sop-core.cabal +++ b/sop-core/sop-core.cabal @@ -25,7 +25,7 @@ category: Data 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.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.7, GHC == 9.4.4, GHC == 9.6.1 +tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.7, GHC == 9.4.4, GHC == 9.6.1, GHC == 9.8.1 source-repository head type: git @@ -41,8 +41,8 @@ library Data.SOP.NP Data.SOP.NS Data.SOP.Sing - build-depends: base >= 4.9 && < 4.19, - deepseq >= 1.3 && < 1.5 + build-depends: base >= 4.9 && < 4.20, + deepseq >= 1.3 && < 1.6 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall