packages feed

text-show 3.8.5 → 3.9

raw patch · 16 files changed

+267/−66 lines, 16 filesdep ~basedep ~bytestringdep ~ghc-boot-th

Dependency ranges changed: base, bytestring, ghc-boot-th, template-haskell

Files

CHANGELOG.md view
@@ -1,3 +1,11 @@+## 3.9 [2020.10.03]+* Allow building with GHC 9.0.+* Remove `TextShow(1)` instances for `Data.Semigroup.Option`, which is+  deprecated as of `base-4.15.0.0`.+* Fix a bug in which `deriveTextShow{1,2}` would needlessly reject data types+  whose last type parameters appear as oversaturated arguments to a type+  family.+ ### 3.8.5 [2020.02.28] * Import from `GHC.Exts`, not `GHC.Prim`. 
shared/TextShow/TH/Names.hs view
@@ -42,7 +42,11 @@  -- | Creates a 'Name' for a value from the "GHC.Event.Internal" module. mkEventName_v :: String -> Name+#if MIN_VERSION_base(4,15,0)+mkEventName_v = mkNameG_v "base" "GHC.Event.Internal.Types"+#else mkEventName_v = mkNameG_v "base" "GHC.Event.Internal"+#endif  -- | The 'Name' of 'evtClose'. evtCloseValName :: Name
src/TextShow/Data/Semigroup.hs view
@@ -15,7 +15,7 @@ -} module TextShow.Data.Semigroup () where -import Data.Semigroup.Compat (Min, Max, First, Last, WrappedMonoid, Option, Arg)+import Data.Semigroup.Compat (Min, Max, First, Last, WrappedMonoid, Arg)  import TextShow.Data.Maybe () import TextShow.TH.Internal (deriveTextShow, deriveTextShow1, deriveTextShow2)@@ -44,11 +44,6 @@ $(deriveTextShow  ''WrappedMonoid) -- | /Since: 3/ $(deriveTextShow1 ''WrappedMonoid)---- | /Since: 3/-$(deriveTextShow  ''Option)--- | /Since: 3/-$(deriveTextShow1 ''Option)  -- | /Since: 3/ $(deriveTextShow  ''Arg)
src/TextShow/Foreign/Ptr.hs view
@@ -24,7 +24,7 @@  import GHC.Exts (addr2Int#, int2Word#) import GHC.ForeignPtr (unsafeForeignPtrToPtr)-import GHC.Num (wordToInteger)+import GHC.Num import GHC.Ptr (Ptr(..))  import Prelude ()@@ -45,13 +45,18 @@  -- | /Since: 2/ instance TextShow1 Ptr where-    liftShowbPrec _ _ _ (Ptr a) = padOut . showbHex $ wordToInteger (int2Word# (addr2Int# a))+    liftShowbPrec _ _ _ (Ptr a) = padOut . showbHex $+      integerFromWord# (int2Word# (addr2Int# a))       where         padOut :: Builder -> Builder         padOut ls =              singleton '0' <> singleton 'x'           <> mtimesDefault (max 0 $ 2*SIZEOF_HSPTR - lengthB ls) (singleton '0')           <> ls++#if !(MIN_VERSION_base(4,15,0))+        integerFromWord# = wordToInteger+#endif  -- | /Since: 2/ instance TextShow (FunPtr a) where
src/TextShow/GHC/RTS/Flags.hs view
@@ -45,6 +45,10 @@ $(deriveTextShow ''GCFlags) -- | /Since: 2/ $(deriveTextShow ''ConcFlags)+# if MIN_VERSION_base(4,15,0)+-- | /Since: 3.9/+$(deriveTextShow ''IoSubSystem)+# endif -- | /Since: 2/ $(deriveTextShow ''MiscFlags) -- | /Since: 2/
src/TextShow/Generic.hs view
@@ -459,11 +459,7 @@     gshow_prec sfs p (M1 x) = gshow_prec sfs p x                                        \  };                                                                                     \                                                                                         \-instance gtext_show Zero V1 where {                                                     \-    gshow_prec _ _ x = EMPTY_CASE(x)                                                    \- };                                                                                     \-                                                                                        \-instance gtext_show One V1 where {                                                      \+instance gtext_show arity V1 where {                                                    \     gshow_prec _ _ x = EMPTY_CASE(x)                                                    \  };                                                                                     \                                                                                         \
src/TextShow/Numeric/Natural.hs view
@@ -17,20 +17,29 @@ -} module TextShow.Numeric.Natural () where -#if MIN_VERSION_base(4,8,0)+#if MIN_VERSION_base(4,15,0)+import GHC.Num (integerFromNatural)+import GHC.Num.Natural (Natural(..))+#elif MIN_VERSION_base(4,8,0) import GHC.Integer.GMP.Internals (Integer(..)) import GHC.Natural (Natural(..))-import GHC.Types (Word(..)) #else import Numeric.Natural.Compat (Natural) #endif +#if MIN_VERSION_base(4,8,0)+import GHC.Exts (Word(..))+#endif+ import TextShow.Classes (TextShow(..)) import TextShow.Data.Integral ()  -- | /Since: 2/ instance TextShow Natural where-#if MIN_VERSION_base(4,8,0)+#if MIN_VERSION_base(4,15,0)+    showbPrec p (NS w) = showbPrec p (W# w)+    showbPrec p n      = showbPrec p (integerFromNatural n)+#elif MIN_VERSION_base(4,8,0)     showbPrec _ (NatS# w#)  = showb $ W# w#     showbPrec p (NatJ# bn)  = showbPrec p $ Jp# bn #else
src/TextShow/TH/Internal.hs view
@@ -57,9 +57,9 @@     ) where  import           Control.Monad (unless, when)+import qualified Control.Monad as Monad (fail) import           Data.Foldable.Compat-import           Data.List.Compat-import qualified Data.List.NonEmpty.Compat as NE (reverse)+import qualified Data.List.Compat as List import           Data.List.NonEmpty.Compat (NonEmpty(..), (<|)) import qualified Data.Map as Map (fromList, keys, lookup, singleton) import           Data.Map (Map)@@ -560,7 +560,7 @@     ghc7'8OrLater = False #endif --- | Generates a lambda expression for howbPrec/liftShowbPrec/etc. for a+-- | Generates a lambda expression for showbPrec/liftShowbPrec/etc. for a -- single constructor. makeTextShowForCon :: Name                    -> TextShowClass@@ -603,7 +603,7 @@        then do          let showArgs       = zipWith (makeTextShowForArg 0 tsClass tsFun conName tvMap) argTys' args              parenCommaArgs = (varE (singletonName tsFun) `appE` charE '(')-                              : intersperse (varE (singletonName tsFun) `appE` charE ',') showArgs+                              : List.intersperse (varE (singletonName tsFun) `appE` charE ',') showArgs              mappendArgs    = foldr' (`infixApp` [| (<>) |])                                      (varE (singletonName tsFun) `appE` charE ')')                                      parenCommaArgs@@ -684,7 +684,7 @@       )       [] --- | Generates a lambda expression for howbPrec/liftShowbPrec/etc. for an+-- | Generates a lambda expression for showbPrec/liftShowbPrec/etc. for an -- argument of a constructor. makeTextShowForArg :: Int                    -> TextShowClass@@ -728,7 +728,7 @@ makeTextShowForArg p tsClass tsFun conName tvMap ty tyExpName =     [| $(makeTextShowForType tsClass tsFun conName tvMap False ty) p $(varE tyExpName) |] --- | Generates a lambda expression for howbPrec/liftShowbPrec/etc. for a+-- | Generates a lambda expression for showbPrec/liftShowbPrec/etc. for a -- specific type. The generated expression depends on the number of type variables. -- -- 1. If the type is of kind * (T), apply showbPrec.@@ -766,9 +766,8 @@         tyVarNames :: [Name]         tyVarNames = Map.keys tvMap -    itf <- isTyFamily tyCon-    if any (`mentionsName` tyVarNames) lhsArgs-          || itf && any (`mentionsName` tyVarNames) tyArgs+    itf <- isInTypeFamilyApp tyVarNames tyCon tyArgs+    if any (`mentionsName` tyVarNames) lhsArgs || itf        then outOfPlaceTyVarError tsClass conName        else if any (`mentionsName` tyVarNames) rhsArgs                then appsE $ [ varE $ showPrecOrListName sl (toEnum numLastArgs) tsFun]@@ -870,7 +869,7 @@         --   instance C (Fam [Char])         remainingTysOrigSubst :: [Type]         remainingTysOrigSubst =-          map (substNamesWithKindStar (union droppedKindVarNames kvNames'))+          map (substNamesWithKindStar (List.union droppedKindVarNames kvNames'))             $ take remainingLength varTysOrig          isDataFamily :: Bool@@ -1009,8 +1008,8 @@  -- | Either the given data type doesn't have enough type variables, or one of -- the type variables to be eta-reduced cannot realize kind *.-derivingKindError :: TextShowClass -> Name -> a-derivingKindError tsClass tyConName = error+derivingKindError :: TextShowClass -> Name -> Q a+derivingKindError tsClass tyConName = Monad.fail     . showString "Cannot derive well-kinded instance of form ‘"     . showString className     . showChar ' '@@ -1029,15 +1028,15 @@  -- | One of the last type variables cannot be eta-reduced (see the canEtaReduce -- function for the criteria it would have to meet).-etaReductionError :: Type -> a-etaReductionError instanceType = error $+etaReductionError :: Type -> Q a+etaReductionError instanceType = Monad.fail $     "Cannot eta-reduce to an instance of form \n\tinstance (...) => "     ++ pprint instanceType  -- | The data type has a DatatypeContext which mentions one of the eta-reduced -- type variables.-datatypeContextError :: Name -> Type -> a-datatypeContextError dataName instanceType = error+datatypeContextError :: Name -> Type -> Q a+datatypeContextError dataName instanceType = Monad.fail     . showString "Can't make a derived instance of ‘"     . showString (pprint instanceType)     . showString "‘:\n\tData type ‘"@@ -1047,8 +1046,8 @@  -- | The data type mentions one of the n eta-reduced type variables in a place other -- than the last nth positions of a data type in a constructor's field.-outOfPlaceTyVarError :: TextShowClass -> Name -> a-outOfPlaceTyVarError tsClass conName = error+outOfPlaceTyVarError :: TextShowClass -> Name -> Q a+outOfPlaceTyVarError tsClass conName = Monad.fail     . showString "Constructor ‘"     . showString (nameBase conName)     . showString "‘ must only use its last "@@ -1408,22 +1407,53 @@ isTyVar (SigT t _) = isTyVar t isTyVar _          = False --- | Is the given type a type family constructor (and not a data family constructor)?-isTyFamily :: Type -> Q Bool-isTyFamily (ConT n) = do-    info <- reify n-    return $ case info of+-- | Detect if a Name in a list of provided Names occurs as an argument to some+-- type family. This makes an effort to exclude /oversaturated/ arguments to+-- type families. For instance, if one declared the following type family:+--+-- @+-- type family F a :: Type -> Type+-- @+--+-- Then in the type @F a b@, we would consider @a@ to be an argument to @F@,+-- but not @b@.+isInTypeFamilyApp :: [Name] -> Type -> [Type] -> Q Bool+isInTypeFamilyApp names tyFun tyArgs =+  case tyFun of+    ConT tcName -> go tcName+    _           -> return False+  where+    go :: Name -> Q Bool+    go tcName = do+      info <- reify tcName+      case info of #if MIN_VERSION_template_haskell(2,11,0)-         FamilyI OpenTypeFamilyD{} _       -> True+        FamilyI (OpenTypeFamilyD (TypeFamilyHead _ bndrs _ _)) _+          -> withinFirstArgs bndrs+#elif MIN_VERSION_template_haskell(2,7,0)+        FamilyI (FamilyD TypeFam _ bndrs _) _+          -> withinFirstArgs bndrs #else-         FamilyI (FamilyD TypeFam _ _ _) _ -> True+        TyConI (FamilyD TypeFam _ bndrs _)+          -> withinFirstArgs bndrs #endif-#if MIN_VERSION_template_haskell(2,9,0)-         FamilyI ClosedTypeFamilyD{} _     -> True++#if MIN_VERSION_template_haskell(2,11,0)+        FamilyI (ClosedTypeFamilyD (TypeFamilyHead _ bndrs _ _) _) _+          -> withinFirstArgs bndrs+#elif MIN_VERSION_template_haskell(2,9,0)+        FamilyI (ClosedTypeFamilyD _ bndrs _ _) _+          -> withinFirstArgs bndrs #endif-         _ -> False-isTyFamily _ = return False +        _ -> return False+      where+        withinFirstArgs :: [a] -> Q Bool+        withinFirstArgs bndrs =+          let firstArgs = take (length bndrs) tyArgs+              argFVs    = freeVariables firstArgs+          in return $ any (`elem` argFVs) names+ -- | Are all of the items in a list (which have an ordering) distinct? -- -- This uses Set (as opposed to nub) for better asymptotic time complexity.@@ -1478,13 +1508,16 @@ -- [Either, Int, Char] -- @ unapplyTy :: Type -> NonEmpty Type-unapplyTy = NE.reverse . go+unapplyTy ty = go ty ty []   where-    go :: Type -> NonEmpty Type-    go (AppT t1 t2)    = t2 <| go t1-    go (SigT t _)      = go t-    go (ForallT _ _ t) = go t-    go t               = t :| []+    go :: Type -> Type -> [Type] -> NonEmpty Type+    go _      (AppT ty1 ty2)     args = go ty1 ty1 (ty2:args)+    go origTy (SigT ty' _)       args = go origTy ty' args+#if MIN_VERSION_template_haskell(2,11,0)+    go origTy (InfixT ty1 n ty2) args = go origTy (ConT n `AppT` ty1 `AppT` ty2) args+    go origTy (ParensT ty')      args = go origTy ty' args+#endif+    go origTy _                  args = origTy :| args  -- | Split a type signature by the arrows on its spine. For example, this: --
+ tests/Derived/TypeFamilies.hs view
@@ -0,0 +1,68 @@+-- {-# LANGUAGE CPP                        #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE TemplateHaskell            #-}+{-# LANGUAGE TypeFamilies               #-}++{-|+Module:      Derived.TypeFamilies+Copyright:   (C) 2020 Ryan Scott+License:     BSD-style (see the file LICENSE)+Maintainer:  Ryan Scott+Stability:   Provisional+Portability: GHC++Defines corner case-provoking type families.+-}+module Derived.TypeFamilies (+      TyConOverSat(..)+    , TyFamilyOverSat(..)+    ) where++import Test.QuickCheck (Arbitrary)++{-+import Text.Show.Deriving (deriveShow1)+#if defined(NEW_FUNCTOR_CLASSES)+import Text.Show.Deriving (deriveShow2)+#endif+-}++import TextShow.TH (deriveTextShow, deriveTextShow1, deriveTextShow2)++-------------------------------------------------------------------------------++type family F :: * -> * -> *+type instance F = Either++newtype TyConOverSat a b = TyConOverSat (F a b)+  deriving (Arbitrary, Show)++data family TyFamilyOverSat (x :: *) (y :: *)+newtype instance TyFamilyOverSat a b = TyFamilyOverSat (F a b)+  deriving (Arbitrary, Show)++-------------------------------------------------------------------------------++{-+TODO: Define these once we depend on deriving-compat-0.5.8 as the minimum++$(deriveShow1 ''TyConOverSat)+$(deriveShow1 'TyFamilyOverSat)+#if defined(NEW_FUNCTOR_CLASSES)+$(deriveShow2 ''TyConOverSat)+$(deriveShow2 'TyFamilyOverSat)+#endif+-}++$(deriveTextShow  ''TyConOverSat)+$(deriveTextShow1 ''TyConOverSat)+$(deriveTextShow2 ''TyConOverSat)++$(deriveTextShow  'TyFamilyOverSat)+$(deriveTextShow1 'TyFamilyOverSat)+$(deriveTextShow2 'TyFamilyOverSat)++{-+TODO: Define Generic(1) instances once we depend on generic-deriving-1.13.2+as the minimum+-}
tests/Instances/GHC/Fingerprint.hs view
@@ -16,7 +16,9 @@ module Instances.GHC.Fingerprint () where  import GHC.Fingerprint.Type (Fingerprint(..))+#if !(MIN_VERSION_base(4,15,0)) import GHC.Generics (Generic)+#endif  import Instances.Utils.GenericArbitrary (genericArbitrary) @@ -25,4 +27,6 @@ instance Arbitrary Fingerprint where     arbitrary = genericArbitrary +#if !(MIN_VERSION_base(4,15,0)) deriving instance Generic Fingerprint+#endif
tests/Instances/GHC/RTS/Flags.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP             #-}+{-# LANGUAGE CPP                  #-}  #if MIN_VERSION_base(4,8,0) {-# LANGUAGE DataKinds            #-}@@ -7,6 +7,14 @@ {-# LANGUAGE TypeFamilies         #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-}+# if __GLASGOW_HASKELL__ == 802+-- For whatever reason, compiling this module with optimizations on GHC 8.2.2+-- triggers a "Simplifier ticks exhausted" panic, and increasing the tick limit+-- doesn't seem to help. Moreover, 8.2.2 is the /only/ GHC version I have seen+-- this happen on. Life is short, so I'm just going to work around this by+-- disabling optimizations on 8.2.2 only.+{-# OPTIONS_GHC -O0               #-}+# endif #endif  {-|@@ -36,6 +44,7 @@ import           Test.QuickCheck (Arbitrary(..)) import           TextShow.TH.Names +#if !(MIN_VERSION_base(4,15,0)) $(Generics.deriveAll0 ''RTSFlags) $(Generics.deriveAll0 ''GCFlags) $(Generics.deriveAll0 ''ConcFlags)@@ -53,7 +62,12 @@ $(Generics.deriveAll0 doCostCentresTypeName) $(Generics.deriveAll0 doHeapProfileTypeName) $(Generics.deriveAll0 doTraceTypeName)+#endif +#if MIN_VERSION_base(4,15,0)+$(Generics.deriveAll0 ''IoSubSystem)+#endif+ instance Arbitrary RTSFlags where     arbitrary = genericArbitrary @@ -62,6 +76,11 @@  instance Arbitrary ConcFlags where     arbitrary = genericArbitrary++#if MIN_VERSION_base(4,15,0)+instance Arbitrary IoSubSystem where+    arbitrary = genericArbitrary+#endif  instance Arbitrary MiscFlags where     arbitrary = genericArbitrary
tests/Instances/GHC/Stack.hs view
@@ -20,7 +20,6 @@ module Instances.GHC.Stack () where  #if MIN_VERSION_base(4,8,1)-import qualified Generics.Deriving.TH as Generics (deriveAll0) # if MIN_VERSION_base(4,9,0) import           GHC.Stack.Types (CallStack(..), SrcLoc(..)) import           Instances.Utils ((<@>))@@ -30,6 +29,10 @@ import           GHC.Stack (CallStack) # endif +# if !(MIN_VERSION_base(4,15,0))+import qualified Generics.Deriving.TH as Generics (deriveAll0)+# endif+ import           Instances.Utils.GenericArbitrary (genericArbitrary)  import           Test.QuickCheck (Arbitrary(..))@@ -37,7 +40,9 @@ # if !(MIN_VERSION_base(4,9,0)) $(Generics.deriveAll0 ''CallStack) # endif+# if !(MIN_VERSION_base(4,15,0)) $(Generics.deriveAll0 ''SrcLoc)+# endif  instance Arbitrary CallStack where # if MIN_VERSION_base(4,9,0)
tests/Spec/Data/SemigroupSpec.hs view
@@ -11,7 +11,7 @@ module Spec.Data.SemigroupSpec (main, spec) where  import Data.Proxy.Compat (Proxy(..))-import Data.Semigroup.Compat (Min, Max, First, Last, WrappedMonoid, Option, Arg)+import Data.Semigroup.Compat (Min, Max, First, Last, WrappedMonoid, Arg)  import Instances.Data.Semigroup () @@ -35,7 +35,5 @@         matchesTextShowSpec  (Proxy :: Proxy (Last Int))     describe "WrappedMonoid ()" $         matchesTextShowSpec  (Proxy :: Proxy (WrappedMonoid ()))-    describe "Option Int" $-        matchesTextShowSpec  (Proxy :: Proxy (Option Int))     describe "Arg Int Char" $         matchesTextShowSpec  (Proxy :: Proxy (Arg Int Char))
+ tests/Spec/Derived/TypeFamiliesSpec.hs view
@@ -0,0 +1,42 @@+{-|+Module:      Spec.Derived.TypeFamiliesSpec+Copyright:   (C) 2020 Ryan Scott+License:     BSD-style (see the file LICENSE)+Maintainer:  Ryan Scott+Stability:   Provisional+Portability: GHC++@hspec@ tests involving corner case-provoking type families.+-}+module Spec.Derived.TypeFamiliesSpec (main, spec) where++{-+import Data.Proxy.Compat (Proxy(..))++import Derived.TypeFamilies+-}++import Prelude ()+import Prelude.Compat++{-+import Spec.Utils (matchesTextShow1Spec)++import Test.Hspec (Spec, describe, hspec, parallel)+-}+import Test.Hspec (Spec, hspec)++main :: IO ()+main = hspec spec++spec :: Spec+spec = pure ()+{-+TODO: Uncomment once we depend on deriving-compat-0.5.8 as the minimum++spec = parallel $ do+    describe "TyConOverSat Int Int" $+        matchesTextShow1Spec (Proxy :: Proxy (TyConOverSat Int Int))+    describe "TyFamilyOverSat Int Int" $+        matchesTextShow1Spec (Proxy :: Proxy (TyFamilyOverSat Int Int))+-}
tests/Spec/GHC/RTS/FlagsSpec.hs view
@@ -37,6 +37,10 @@         matchesTextShowSpec (Proxy :: Proxy GCFlags)     describe "ConcFlags" $         matchesTextShowSpec (Proxy :: Proxy ConcFlags)+# if MIN_VERSION_base(4,15,0)+    describe "IoSubSystem" $+        matchesTextShowSpec (Proxy :: Proxy IoSubSystem)+# endif     describe "MiscFlags" $         matchesTextShowSpec (Proxy :: Proxy MiscFlags)     describe "DebugFlags" $
text-show.cabal view
@@ -1,5 +1,5 @@ name:                text-show-version:             3.8.5+version:             3.9 synopsis:            Efficient conversion of values into Text description:         @text-show@ offers a replacement for the @Show@ typeclass intended                      for use with @Text@ instead of @String@s. This package was created@@ -51,7 +51,8 @@                    , GHC == 8.2.2                    , GHC == 8.4.4                    , GHC == 8.6.5-                   , GHC == 8.8.2+                   , GHC == 8.8.3+                   , GHC == 8.10.1 extra-source-files:  CHANGELOG.md, README.md, include/*.h cabal-version:       >=1.10 @@ -163,18 +164,18 @@                      , ghc-prim                      , integer-gmp                      , text                  >= 0.11.1 && < 1.3-                     , th-abstraction        >= 0.3    && < 0.4+                     , th-abstraction        >= 0.3    && < 0.5                      , th-lift               >= 0.7.6  && < 1    if flag(base-4-9)-    build-depends:     base                  >= 4.9 && < 4.14+    build-depends:     base                  >= 4.9 && < 4.16     cpp-options:       "-DNEW_FUNCTOR_CLASSES"   else     build-depends:     base                  >= 4.5 && < 4.9    if flag(template-haskell-2-11)-    build-depends:     template-haskell      >= 2.11 && < 2.16-                     , ghc-boot-th           >= 8.0  && < 8.9+    build-depends:     template-haskell      >= 2.11 && < 2.18+                     , ghc-boot-th           >= 8.0  && < 9.1   else     build-depends:     template-haskell      >= 2.5  && < 2.11 @@ -188,6 +189,8 @@   hs-source-dirs:      src, shared   default-language:    Haskell2010   ghc-options:         -Wall+  if impl(ghc >= 8.6)+    ghc-options:       -Wno-star-is-type   include-dirs:        include   includes:            generic.h @@ -202,6 +205,7 @@                        Derived.PolyKinds                        Derived.RankNTypes                        Derived.Records+                       Derived.TypeFamilies                        Derived.TypeSynonyms                         Instances.Control.Concurrent@@ -294,6 +298,7 @@                        Spec.Derived.PolyKindsSpec                        Spec.Derived.RankNTypesSpec                        Spec.Derived.RecordsSpec+                       Spec.Derived.TypeFamiliesSpec                        Spec.Derived.TypeSynonymsSpec                        Spec.Foreign.C.TypesSpec                        Spec.Foreign.PtrSpec@@ -342,16 +347,16 @@                      , generic-deriving      >= 1.11   && < 2                      , ghc-prim                      , hspec                 >= 2      && < 3-                     , QuickCheck            >= 2.12   && < 2.14+                     , QuickCheck            >= 2.12   && < 2.15                      , quickcheck-instances  >= 0.3.18 && < 0.4-                     , template-haskell      >= 2.5    && < 2.16+                     , template-haskell      >= 2.5    && < 2.18                      , text                  >= 0.11.1 && < 1.3                      , text-show                      , transformers-compat   >= 0.5    && < 1   build-tool-depends:  hspec-discover:hspec-discover    if flag(base-4-9)-    build-depends:     base                  >= 4.9 && < 4.14+    build-depends:     base                  >= 4.9 && < 4.16     cpp-options:       "-DNEW_FUNCTOR_CLASSES"   else     build-depends:     base                  >= 4.5 && < 4.9@@ -365,6 +370,8 @@   hs-source-dirs:      tests, shared   default-language:    Haskell2010   ghc-options:         -Wall -threaded -rtsopts+  if impl(ghc >= 8.6)+    ghc-options:       -Wno-star-is-type   include-dirs:        include   includes:            generic.h                      , overlap.h@@ -372,7 +379,7 @@ benchmark bench   type:                exitcode-stdio-1.0   main-is:             Bench.hs-  build-depends:       base      >= 4.5    && < 4.14+  build-depends:       base      >= 4.5    && < 4.16                      , criterion >= 1.1.4  && < 2                      , deepseq   >= 1.3    && < 2                      , ghc-prim