packages feed

text-show-instances 3.9.2 → 3.9.3

raw patch · 30 files changed

+191/−402 lines, 30 filesdep +aesondep +base-compatdep −base-compat-batteriesdep ~Win32dep ~basedep ~binaryPVP ok

version bump matches the API change (PVP)

Dependencies added: aeson, base-compat

Dependencies removed: base-compat-batteries

Dependency ranges changed: Win32, base, binary, containers, directory, haskeline, pretty, template-haskell, time, transformers

API changes (from Hackage documentation)

+ TextShow.Data.Aeson: instance TextShow.Classes.TextShow Data.Aeson.Key.Key
+ TextShow.Data.Aeson: instance TextShow.Classes.TextShow Data.Aeson.Types.Internal.Value

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+### 3.9.3 [2022.12.28]+* Add `TextShow` instances for `Value` and `Key` from `aeson`.+* Drop support for GHC 7.8 and 7.10.+ ### 3.9.2 [2022.10.05] * Require `text-show-3.10` or later in the test suite. 
README.md view
@@ -18,6 +18,7 @@  `text-show-instances` is a supplemental library to [`text-show`](https://github.com/RyanGlScott/text-show) that provides additional `Show` instances for data types in common Haskell libraries and GHC dependencies that are not encompassed by `text-show`. Currently, `text-show-instances` covers these libraries: +* [`aeson`](https://hackage.haskell.org/package/aeson) * [`bifunctors`](http://hackage.haskell.org/package/bifunctors) * [`binary`](http://hackage.haskell.org/package/binary) * [`containers`](http://hackage.haskell.org/package/containers)
+ src/TextShow/Data/Aeson.hs view
@@ -0,0 +1,33 @@+{-# LANGUAGE OverloadedStrings #-}+{-# OPTIONS -fno-warn-orphans #-}+module TextShow.Data.Aeson where++import Data.Aeson (Value(..))+import qualified Data.Aeson.Key as K+import qualified Data.Aeson.KeyMap as KM++import Prelude ()+import Prelude.Compat++import TextShow (TextShow(..), fromText, showbParen, showtToShowb, singleton)+import TextShow.Data.Scientific ()+import TextShow.Data.Vector ()++instance TextShow K.Key where+    showb = showtToShowb showt+    showt = showt . K.toText++instance TextShow Value where+    showbPrec _ Null = fromText "Null"+    showbPrec d (Bool b) = showbParen (d > 10)+        $ fromText "Bool " <> showbPrec 11 b+    showbPrec d (Number s) = showbParen (d > 10)+        $ fromText "Number " <> showbPrec 11 s+    showbPrec d (String s) = showbParen (d > 10)+        $ fromText "String " <> showbPrec 11 s+    showbPrec d (Array xs) = showbParen (d > 10)+        $ fromText "Array " <> showbPrec 11 xs+    showbPrec d (Object xs) = showbParen (d > 10)+        $ fromText "Object (fromList "+        <> showbPrec 11 (KM.toAscList xs)+        <> singleton ')'
src/TextShow/Data/Bifunctor.hs view
@@ -1,11 +1,7 @@-{-# LANGUAGE CPP                  #-} {-# LANGUAGE FlexibleContexts     #-}+{-# LANGUAGE PolyKinds            #-} {-# LANGUAGE TemplateHaskell      #-} {-# LANGUAGE UndecidableInstances #-}--#if __GLASGOW_HASKELL__ >= 706-{-# LANGUAGE PolyKinds            #-}-#endif  {-# OPTIONS_GHC -fno-warn-orphans #-} 
src/TextShow/Data/Functor/Trans.hs view
@@ -1,9 +1,5 @@-{-# LANGUAGE CPP               #-} {-# LANGUAGE OverloadedStrings #-}--#if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds         #-}-#endif  {-# OPTIONS_GHC -fno-warn-orphans #-} {-|
src/TextShow/Data/Tagged.hs view
@@ -1,9 +1,5 @@-{-# LANGUAGE CPP               #-} {-# LANGUAGE OverloadedStrings #-}--#if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds         #-}-#endif  {-# OPTIONS -fno-warn-orphans #-} {-|
src/TextShow/Data/Time.hs view
@@ -1,8 +1,6 @@ {-# LANGUAGE CPP               #-} {-# LANGUAGE OverloadedStrings #-}-#if MIN_VERSION_time(1,5,0) {-# LANGUAGE TemplateHaskell   #-}-#endif {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module:      TextShow.Data.Time@@ -23,6 +21,7 @@ import Data.Time.Calendar (Day, toGregorian) import Data.Time.Clock (DiffTime, UTCTime, NominalDiffTime, UniversalTime) import Data.Time.Clock.TAI (AbsoluteTime, taiToUTCTime)+import Data.Time.Format (TimeLocale) import Data.Time.LocalTime (TimeZone(..), TimeOfDay(..), LocalTime(..), ZonedTime(..),                             ut1ToLocalTime, utc, utcToLocalTime, utcToZonedTime) @@ -33,11 +32,7 @@                  fromString, lengthB, showbSpace, singleton) import TextShow.Data.Fixed (showbFixed) import TextShow.Data.Integral ()--#if MIN_VERSION_time(1,5,0)-import Data.Time.Format (TimeLocale) import TextShow.TH (deriveTextShow)-#endif  #if MIN_VERSION_time(1,7,0) import Data.Maybe (fromJust)@@ -166,12 +161,8 @@     showb t = showb $ ut1ToLocalTime 0 t     {-# INLINE showb #-} -#if MIN_VERSION_time(1,5,0)--- | Only available with @time-1.5@ or later.------ /Since: 2/+-- | /Since: 2/ $(deriveTextShow ''TimeLocale)-#endif  #if MIN_VERSION_time(1,8,0) -- | Only available with @time-1.8@ or later.
src/TextShow/GHC/ForeignSrcLang/Type.hs view
@@ -1,10 +1,8 @@ {-# LANGUAGE CPP             #-} -#if defined(MIN_VERSION_ghc_boot_th)-# if MIN_VERSION_ghc_boot_th(8,2,0)+#if MIN_VERSION_ghc_boot_th(8,2,0) {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-}-# endif #endif  {-|@@ -22,12 +20,10 @@ -} module TextShow.GHC.ForeignSrcLang.Type () where -#if defined(MIN_VERSION_ghc_boot_th)-# if MIN_VERSION_ghc_boot_th(8,2,0)+#if MIN_VERSION_ghc_boot_th(8,2,0) import GHC.ForeignSrcLang.Type (ForeignSrcLang) import TextShow.TH (deriveTextShow)  -- | /Since: 3.6/ $(deriveTextShow ''ForeignSrcLang)-# endif #endif
src/TextShow/GHC/LanguageExtensions/Type.hs view
@@ -1,9 +1,5 @@-{-# LANGUAGE CPP             #-}--#if defined(MIN_VERSION_ghc_boot_th) {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-}-#endif  {-| Module:      TextShow.GHC.LanguageExtensions.Type@@ -14,16 +10,13 @@ Portability: GHC  'TextShow' instance for the 'Extension' data type.-Only provided if using @ghc-boot-th@.  /Since: 3.3/ -} module TextShow.GHC.LanguageExtensions.Type () where -#if defined(MIN_VERSION_ghc_boot_th) import GHC.LanguageExtensions.Type (Extension) import TextShow.TH (deriveTextShow)  -- | /Since: 3.3/ $(deriveTextShow ''Extension)-#endif
src/TextShow/Instances.hs view
@@ -25,6 +25,7 @@ import TextShow.Control.Applicative.Trans   () import TextShow.Control.Monad.Trans         () +import TextShow.Data.Aeson                  () import TextShow.Data.Bifunctor              () import TextShow.Data.Binary                 () import TextShow.Data.Containers             ()
src/TextShow/Language/Haskell/TH.hs view
@@ -34,10 +34,6 @@ import           TextShow.Text.PrettyPrint (renderB) import           TextShow.TH (deriveTextShow) -#if !(MIN_VERSION_template_haskell(2,10,0))-import           GHC.Exts (Int(I#))-#endif- #if MIN_VERSION_base(4,15,0) import qualified Data.Text.Foreign as TS (peekCStringLen) import           Foreign.ForeignPtr (withForeignPtr)@@ -76,14 +72,8 @@                Name occ NameS         -> occB occ                Name occ (NameQ m)     -> modB m   <> singleton '.' <> occB occ                Name occ (NameG _ _ m) -> modB m   <> singleton '.' <> occB occ-               Name occ (NameU u)     -> occB occ <> singleton '_' <> showb (mkInt u)-               Name occ (NameL u)     -> occB occ <> singleton '_' <> showb (mkInt u)--#if MIN_VERSION_template_haskell(2,10,0)-    mkInt = id-#else-    mkInt i# = I# i#-#endif+               Name occ (NameU u)     -> occB occ <> singleton '_' <> showb u+               Name occ (NameL u)     -> occB occ <> singleton '_' <> showb u      occB :: OccName -> Builder     occB = fromString . occString@@ -172,11 +162,6 @@   , ''TySynEqn   , ''TyVarBndr -#if !(MIN_VERSION_template_haskell(2,10,0))-  , ''Pred-#endif--#if MIN_VERSION_template_haskell(2,11,0)   , ''Bang   , ''DecidedStrictness   , ''FamilyResultSig@@ -185,9 +170,6 @@   , ''SourceStrictness   , ''SourceUnpackedness   , ''TypeFamilyHead-#else-  , ''Strict-#endif  #if MIN_VERSION_template_haskell(2,12,0)   , ''DerivClause
src/TextShow/System/Directory.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP             #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-|@@ -15,19 +14,12 @@ -} module TextShow.System.Directory () where -import System.Directory (Permissions)-#if MIN_VERSION_directory(1,2,3)-import System.Directory (XdgDirectory)-#endif+import System.Directory (Permissions, XdgDirectory)  import TextShow.TH (deriveTextShow)  -- | /Since: 2/ $(deriveTextShow ''Permissions) -#if MIN_VERSION_directory(1,2,3)--- | Only available with @directory-1.2.3.0@ or later.------ /Since: 3.6/+-- | /Since: 3.6/ $(deriveTextShow ''XdgDirectory)-#endif
src/TextShow/Text/PrettyPrint.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP             #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-|@@ -16,10 +15,8 @@ module TextShow.Text.PrettyPrint (       renderB     , renderStyleB-#if MIN_VERSION_pretty(1,1,3)     , renderAnnotB     , renderStyleAnnotB-#endif     ) where  import           Prelude ()@@ -27,20 +24,13 @@  import           Text.PrettyPrint.HughesPJ (Doc, Mode, Style(..), TextDetails(..),                                             fullRender, style)-#if MIN_VERSION_pretty(1,1,2) import           Text.PrettyPrint.HughesPJClass (PrettyLevel)-#endif-#if MIN_VERSION_pretty(1,1,3) import qualified Text.PrettyPrint.Annotated.HughesPJ as Annot (Doc, fullRender, style) import           Text.PrettyPrint.Annotated.HughesPJ (AnnotDetails, Span) import qualified Text.PrettyPrint.Annotated.HughesPJClass as Annot (PrettyLevel) -import           TextShow (TextShow1(..))-import           TextShow.TH (deriveTextShow1)-#endif--import           TextShow (TextShow(..), Builder, fromString, singleton)-import           TextShow.TH (deriveTextShow)+import           TextShow (TextShow(..), TextShow1(..), Builder, fromString, singleton)+import           TextShow.TH (deriveTextShow, deriveTextShow1)  -- | Renders a 'Doc' to a 'Builder' using the default 'style'. --@@ -67,9 +57,7 @@ txtPrinter (PStr s') b = fromString s' <> b {-# INLINE txtPrinter #-} -#if MIN_VERSION_pretty(1,1,3) -- | Renders an annotated 'Doc' to a 'Builder' using the default 'Annot.style'.--- This function is only available with @pretty-1.1.3@ or later. -- -- /Since: 3/ renderAnnotB :: Annot.Doc a -> Builder@@ -77,7 +65,6 @@ {-# INLINE renderAnnotB #-}  -- | Renders an annotated 'Doc' to a 'Builder' using the given 'Style'.--- This function is only available with @pretty-1.1.3@ or later. -- -- /Since: 3/ renderStyleAnnotB :: Style -> Annot.Doc a -> Builder@@ -88,7 +75,6 @@                      txtPrinter                      mempty                      doc-#endif  -- | /Since: 2/ instance TextShow Doc where@@ -101,48 +87,27 @@ $(deriveTextShow ''Style) -- | /Since: 2/ $(deriveTextShow ''TextDetails)--#if MIN_VERSION_pretty(1,1,2)--- | Only available with @pretty-1.1.2.0@ or later.------ /Since: 2/+-- | /Since: 2/ $(deriveTextShow ''PrettyLevel)-#endif -#if MIN_VERSION_pretty(1,1,3)--- | Only available with @pretty-1.1.3@ or later.------ /Since: 3/+-- | /Since: 3/ $(deriveTextShow  ''AnnotDetails)--- | Only available with @pretty-1.1.3@ or later.------ /Since: 3/+-- | /Since: 3/ $(deriveTextShow1 ''AnnotDetails) --- | Only available with @pretty-1.1.3@ or later.------ /Since: 3/+-- | /Since: 3/ instance TextShow (Annot.Doc a) where     showb = renderAnnotB     {-# INLINE showb #-}--- | Only available with @pretty-1.1.3@ or later.------ /Since: 3/+-- | /Since: 3/ instance TextShow1 Annot.Doc where     liftShowbPrec _ _ = showbPrec     {-# INLINE liftShowbPrec #-} --- | Only available with @pretty-1.1.3@ or later.------ /Since: 3/+-- | /Since: 3/ $(deriveTextShow ''Annot.PrettyLevel) --- | Only available with @pretty-1.1.3@ or later.------ /Since: 3/+-- | /Since: 3/ $(deriveTextShow  ''Span)--- | Only available with @pretty-1.1.3@ or later.------ /Since: 3/+-- | /Since: 3/ $(deriveTextShow1 ''Span)-#endif
tests/Instances/Data/Containers.hs view
@@ -20,11 +20,7 @@ import           Data.Sequence (ViewL(..), ViewR(..))  #if !(MIN_VERSION_containers(0,5,9))-# if __GLASGOW_HASKELL__ >= 706 import           GHC.Generics (Generic)-# else-import qualified Generics.Deriving.TH as Generics (deriveAll0)-# endif #endif  import           Instances.Utils.GenericArbitrary (genericArbitrary)@@ -42,21 +38,11 @@     arbitrary = genericArbitrary  #if !(MIN_VERSION_containers(0,5,8))-# if __GLASGOW_HASKELL__ >= 706 deriving instance Generic (ViewL a) deriving instance Generic (ViewR a)-# else-$(Generics.deriveAll0 ''ViewL)-$(Generics.deriveAll0 ''ViewR)-# endif #endif  #if !(MIN_VERSION_containers(0,5,9)) deriving instance Show vertex => Show (SCC vertex)--# if __GLASGOW_HASKELL__ >= 706 deriving instance Generic (SCC vertex)-# else-$(Generics.deriveAll0 ''SCC)-# endif #endif
tests/Instances/GHC/ForeignSrcLang/Type.hs view
@@ -1,10 +1,8 @@ {-# LANGUAGE CPP                #-} -#if defined(MIN_VERSION_ghc_boot_th)-# if MIN_VERSION_ghc_boot_th(8,2,0)+#if MIN_VERSION_ghc_boot_th(8,2,0) {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-}-# endif #endif  {-|@@ -19,8 +17,7 @@ -} module Instances.GHC.ForeignSrcLang.Type () where -#if defined(MIN_VERSION_ghc_boot_th)-# if MIN_VERSION_ghc_boot_th(8,2,0)+#if MIN_VERSION_ghc_boot_th(8,2,0) import GHC.ForeignSrcLang.Type (ForeignSrcLang(..)) import Test.QuickCheck (Arbitrary(..), arbitraryBoundedEnum) @@ -28,5 +25,4 @@ deriving instance Enum ForeignSrcLang instance Arbitrary ForeignSrcLang where     arbitrary = arbitraryBoundedEnum-# endif #endif
tests/Instances/GHC/LanguageExtensions/Type.hs view
@@ -1,9 +1,5 @@-{-# LANGUAGE CPP                #-}--#if defined(MIN_VERSION_ghc_boot_th) {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-}-#endif  {-| Module:      Instances.GHC.LanguageExtensions.Type@@ -17,11 +13,9 @@ -} module Instances.GHC.LanguageExtensions.Type () where -#if defined(MIN_VERSION_ghc_boot_th) import GHC.LanguageExtensions.Type (Extension(..)) import Language.Haskell.TH.Instances () import Test.QuickCheck (Arbitrary(..), arbitraryBoundedEnum)  instance Arbitrary Extension where     arbitrary = arbitraryBoundedEnum-#endif
tests/Instances/System/Console/Terminfo.hs view
@@ -1,13 +1,9 @@ {-# LANGUAGE CPP             #-}  #if !defined(mingw32_HOST_OS)+{-# LANGUAGE DataKinds       #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies    #-}--# if __GLASGOW_HASKELL__ >= 706-{-# LANGUAGE DataKinds       #-}-# endif- {-# OPTIONS_GHC -fno-warn-orphans #-} #endif 
tests/Instances/System/Directory.hs view
@@ -1,11 +1,6 @@-{-# LANGUAGE CPP             #-}+{-# LANGUAGE DataKinds       #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies    #-}--#if __GLASGOW_HASKELL__ >= 706-{-# LANGUAGE DataKinds       #-}-#endif- {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module:      Instances.System.Directory@@ -21,19 +16,12 @@  import qualified Generics.Deriving.TH as Generics (deriveAll0) import           Instances.Utils.GenericArbitrary (genericArbitrary)-import           System.Directory (Permissions)-import           Test.QuickCheck (Arbitrary(..))--#if MIN_VERSION_directory(1,2,3)-import           System.Directory (XdgDirectory(..))-import           Test.QuickCheck (arbitraryBoundedEnum)-#endif+import           System.Directory (Permissions, XdgDirectory(..))+import           Test.QuickCheck (Arbitrary(..), arbitraryBoundedEnum)  $(Generics.deriveAll0 ''Permissions) instance Arbitrary Permissions where     arbitrary = genericArbitrary -#if MIN_VERSION_directory(1,2,3) instance Arbitrary XdgDirectory where     arbitrary = arbitraryBoundedEnum-#endif
tests/Instances/Text/PrettyPrint.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP                        #-} {-# LANGUAGE DeriveGeneric              #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving         #-}@@ -16,9 +15,7 @@ -} module Instances.Text.PrettyPrint () where -#if !(MIN_VERSION_pretty(1,1,2)) || MIN_VERSION_pretty(1,1,3) import           GHC.Generics (Generic)-#endif  import           Instances.Utils.GenericArbitrary (genericArbitrary) @@ -29,15 +26,10 @@  import           Text.PrettyPrint.HughesPJ (Doc, Mode(..), Style(..),                                             TextDetails(..), text)-#if MIN_VERSION_pretty(1,1,2) import           Text.PrettyPrint.HughesPJClass (PrettyLevel(..))-#endif--#if MIN_VERSION_pretty(1,1,3) import qualified Text.PrettyPrint.Annotated.HughesPJ as Annot (Doc, text) import           Text.PrettyPrint.Annotated.HughesPJ (AnnotDetails(..), Span(..)) import qualified Text.PrettyPrint.Annotated.HughesPJClass as Annot (PrettyLevel(..))-#endif  instance Arbitrary Doc where     arbitrary = text <$> arbitrary@@ -53,18 +45,8 @@ instance Arbitrary TextDetails where     arbitrary = genericArbitrary -#if MIN_VERSION_pretty(1,1,2) deriving instance Arbitrary PrettyLevel-#else-deriving instance Show Mode-deriving instance Show Style-deriving instance Show TextDetails -deriving instance Generic Style-deriving instance Generic TextDetails-#endif--#if MIN_VERSION_pretty(1,1,3) instance Arbitrary a => Arbitrary (AnnotDetails a) where     arbitrary = genericArbitrary @@ -78,4 +60,3 @@  deriving instance Generic (AnnotDetails a) deriving instance Generic (Span a)-#endif
tests/Instances/Trace/Hpc.hs view
@@ -1,12 +1,7 @@-{-# LANGUAGE CPP                #-}+{-# LANGUAGE DataKinds          #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell    #-} {-# LANGUAGE TypeFamilies       #-}--#if __GLASGOW_HASKELL__ >= 706-{-# LANGUAGE DataKinds          #-}-#endif- {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module:      Instances.Trace.Hpc
+ tests/Spec/Data/AesonSpec.hs view
@@ -0,0 +1,30 @@+{-|+Module:      Spec.Data.AesonSpec+Copyright:   (C) 2022 Steve Mao+License:     BSD-style (see the file LICENSE)+Maintainer:  Ryan Scott+Stability:   Provisional+Portability: GHC++@hspec@ tests for 'Aeson' (from the @aeson@ package).+-}+module Spec.Data.AesonSpec (main, spec) where++import           Data.Proxy                (Proxy (..))+import           Data.Aeson                (Key, Value)++import           Spec.Utils                (matchesTextShowSpec)++import           Test.Hspec                (Spec, describe, hspec, parallel)++import           TextShow.Data.Aeson       ()++main :: IO ()+main = hspec spec++spec :: Spec+spec = parallel $ do+    describe "Aeson Value" $+        matchesTextShowSpec (Proxy :: Proxy Value)+    describe "Aeson Key" $+        matchesTextShowSpec (Proxy :: Proxy Key)
tests/Spec/Data/BifunctorSpec.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- {-| Module:      Spec.Data.BifunctorSpec Copyright:   (C) 2014-2017 Ryan Scott@@ -26,7 +24,7 @@  import Instances.Data.Bifunctor () -import Spec.Utils +import Spec.Utils  import Test.Hspec (Spec, describe, hspec, parallel) @@ -39,59 +37,39 @@ spec = parallel $ do     describe "Biff Either [] Maybe Char Int" $ do         matchesTextShowSpec  (Proxy :: Proxy (Biff Either [] Maybe Char Int))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow1Spec (Proxy :: Proxy (Biff Either [] Maybe Char Int))         matchesTextShow2Spec (Proxy :: Proxy (Biff Either [] Maybe Char Int))-#endif     describe "Clown [] Char Int" $ do         matchesTextShowSpec  (Proxy :: Proxy (Clown [] Char Int))         matchesTextShow1Spec (Proxy :: Proxy (Clown [] Char Int))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow2Spec (Proxy :: Proxy (Clown [] Char Int))-#endif     describe "Fix Either Int" $ do         matchesTextShowSpec  (Proxy :: Proxy (Fix Either Int))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow1Spec (Proxy :: Proxy (Fix Either Int))-#endif     describe "Flip Either Int Char" $ do         matchesTextShowSpec  (Proxy :: Proxy (Flip Either Int Char))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow1Spec (Proxy :: Proxy (Flip Either Int Char))         matchesTextShow2Spec (Proxy :: Proxy (Flip Either Int Char))-#endif     describe "Join Either Int" $ do         matchesTextShowSpec  (Proxy :: Proxy (Join Either Int))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow1Spec (Proxy :: Proxy (Join Either Int))-#endif     describe "Joker [] Char Int" $ do         matchesTextShowSpec  (Proxy :: Proxy (Joker [] Char Int))         matchesTextShow1Spec (Proxy :: Proxy (Joker [] Char Int))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow2Spec (Proxy :: Proxy (Joker [] Char Int))-#endif     describe "Product Either ((,,) Bool) Int Char" $ do         matchesTextShowSpec  (Proxy :: Proxy (Product Either (,) Int Char))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow1Spec (Proxy :: Proxy (Product Either (,) Int Char))         matchesTextShow2Spec (Proxy :: Proxy (Product Either (,) Int Char))-#endif     describe "Sum Either ((,,) Bool) Int Char" $ do         matchesTextShowSpec  (Proxy :: Proxy (Sum Either (,) Int Char))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow1Spec (Proxy :: Proxy (Sum Either (,) Int Char))         matchesTextShow2Spec (Proxy :: Proxy (Sum Either (,) Int Char))-#endif     describe "Tannen Maybe Either Int Char" $ do         matchesTextShowSpec  (Proxy :: Proxy (Tannen Maybe Either Int Char))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow1Spec (Proxy :: Proxy (Tannen Maybe Either Int Char))         matchesTextShow2Spec (Proxy :: Proxy (Tannen Maybe Either Int Char))-#endif     describe "WrappedBifunctor Either Int Char" $ do         matchesTextShowSpec  (Proxy :: Proxy (WrappedBifunctor Either Int Char))-#if defined(NEW_FUNCTOR_CLASSES)         matchesTextShow1Spec (Proxy :: Proxy (WrappedBifunctor Either Int Char))         matchesTextShow2Spec (Proxy :: Proxy (WrappedBifunctor Either Int Char))-#endif
tests/Spec/Data/TimeSpec.hs view
@@ -13,11 +13,9 @@ module Spec.Data.TimeSpec (main, spec) where  import Data.Proxy (Proxy(..))+import Data.Time (UniversalTime) import Data.Time.Calendar (Day) import Data.Time.Clock (DiffTime, UTCTime, NominalDiffTime)-#if MIN_VERSION_time(1,6,0)-import Data.Time (UniversalTime)-#endif #if MIN_VERSION_time(1,8,0) import Data.Time.Clock.System (SystemTime) #endif@@ -56,10 +54,8 @@         matchesTextShowSpec (Proxy :: Proxy LocalTime)     describe "ZonedTime" $         matchesTextShowSpec (Proxy :: Proxy ZonedTime)-#if MIN_VERSION_time(1,6,0)     describe "UniversalTime" $         matchesTextShowSpec (Proxy :: Proxy UniversalTime)-#endif #if MIN_VERSION_time(1,8,0)     describe "SystemTime" $         matchesTextShowSpec (Proxy :: Proxy SystemTime)
tests/Spec/Data/VectorSpec.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- {-| Module:      Spec.Data.VectorSpec Copyright:   (C) 2014-2017 Ryan Scott@@ -21,10 +19,7 @@  import           Instances.Data.Vector () -import           Spec.Utils (matchesTextShowSpec)-#if MIN_VERSION_base(4,9,0)-import           Spec.Utils (matchesTextShow1Spec)-#endif+import           Spec.Utils (matchesTextShowSpec, matchesTextShow1Spec)  import           Test.Hspec (Spec, describe, hspec, parallel) @@ -39,9 +34,7 @@         let p :: Proxy (B.Vector Char)             p = Proxy         matchesTextShowSpec  p-#if MIN_VERSION_base(4,9,0)         matchesTextShow1Spec p-#endif     describe "(primitive) Vector Char" $         matchesTextShowSpec (Proxy :: Proxy (P.Vector Char))     describe "(storable) Vector Char" $
tests/Spec/GHC/ForeignSrcLang/TypeSpec.hs view
@@ -17,15 +17,13 @@  import Test.Hspec (Spec, hspec, parallel) -#if defined(MIN_VERSION_ghc_boot_th)-# if MIN_VERSION_ghc_boot_th(8,2,0)+#if MIN_VERSION_ghc_boot_th(8,2,0) import Data.Proxy (Proxy(..)) import GHC.ForeignSrcLang.Type (ForeignSrcLang) import Instances.GHC.ForeignSrcLang.Type () import Spec.Utils (matchesTextShowSpec) import Test.Hspec (describe) import TextShow.GHC.ForeignSrcLang.Type ()-# endif #endif  main :: IO ()@@ -33,13 +31,9 @@  spec :: Spec spec = parallel $ do-#if defined(MIN_VERSION_ghc_boot_th)-# if MIN_VERSION_ghc_boot_th(8,2,0)+#if MIN_VERSION_ghc_boot_th(8,2,0)     describe "ForeignSrcLang" $         matchesTextShowSpec (Proxy :: Proxy ForeignSrcLang)-# else-    pure ()-# endif #else     pure () #endif
tests/Spec/GHC/LanguageExtensions/TypeSpec.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- {-| Module:      Spec.GHC.LanguageExtensions.TypeSpec Copyright:   (C) 2014-2017 Ryan Scott@@ -12,28 +10,25 @@ -} module Spec.GHC.LanguageExtensions.TypeSpec (main, spec) where -import Prelude ()-import Prelude.Compat--import Test.Hspec (Spec, hspec, parallel)--#if defined(MIN_VERSION_ghc_boot_th) import Data.Proxy (Proxy(..))+ import GHC.LanguageExtensions.Type (Extension)+ import Instances.GHC.LanguageExtensions.Type ()++import Prelude ()+import Prelude.Compat+ import Spec.Utils (matchesTextShowSpec)-import Test.Hspec (describe)++import Test.Hspec (Spec, describe, hspec, parallel)+ import TextShow.GHC.LanguageExtensions.Type ()-#endif  main :: IO () main = hspec spec  spec :: Spec-spec = parallel $ do-#if defined(MIN_VERSION_ghc_boot_th)+spec = parallel $     describe "Extension" $         matchesTextShowSpec (Proxy :: Proxy Extension)-#else-    pure ()-#endif
tests/Spec/System/DirectorySpec.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-| Module:      Spec.System.DirectorySpec Copyright:   (C) 2014-2017 Ryan Scott@@ -20,10 +19,7 @@  import Spec.Utils (matchesTextShowSpec) -import System.Directory (Permissions)-#if MIN_VERSION_directory(1,2,3)-import System.Directory (XdgDirectory)-#endif+import System.Directory (Permissions, XdgDirectory)  import Test.Hspec (Spec, describe, hspec, parallel) @@ -36,7 +32,5 @@ spec = parallel $ do     describe "Permissions" $         matchesTextShowSpec (Proxy :: Proxy Permissions)-#if MIN_VERSION_directory(1,2,3)     describe "XdgDirectory" $         matchesTextShowSpec (Proxy :: Proxy XdgDirectory)-#endif
tests/Spec/Text/PrettyPrintSpec.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-| Module:      Spec.Text.PrettyPrintSpec Copyright:   (C) 2014-2017 Ryan Scott@@ -15,23 +14,16 @@  import           Instances.Text.PrettyPrint () -import           Spec.Utils (matchesTextShowSpec)-#if MIN_VERSION_pretty(1,1,2)-import           Spec.Utils (genericTextShowSpec)-#endif+import           Spec.Utils (genericTextShowSpec, matchesTextShowSpec)  import           Test.Hspec (Spec, describe, hspec, parallel) -- import           Test.Hspec.QuickCheck (prop)  import           Text.PrettyPrint.HughesPJ (Doc, Mode, Style, TextDetails {-, renderStyle -})-#if MIN_VERSION_pretty(1,1,2) import           Text.PrettyPrint.HughesPJClass (PrettyLevel)-#endif-#if MIN_VERSION_pretty(1,1,3) import qualified Text.PrettyPrint.Annotated.HughesPJ as Annot (Doc) import           Text.PrettyPrint.Annotated.HughesPJ (AnnotDetails, Span) import qualified Text.PrettyPrint.Annotated.HughesPJClass as Annot (PrettyLevel)-#endif -- import           TextShow (fromString) import           TextShow.Text.PrettyPrint () -- (renderStyleB) @@ -49,28 +41,19 @@         let p :: Proxy Mode             p = Proxy         matchesTextShowSpec p-#if MIN_VERSION_pretty(1,1,2)         genericTextShowSpec p-#endif     describe "Style" $ do         let p :: Proxy Style             p = Proxy         matchesTextShowSpec p-#if MIN_VERSION_pretty(1,1,2)         genericTextShowSpec p-#endif     describe "TextDetails" $ do         let p :: Proxy TextDetails             p = Proxy         matchesTextShowSpec p-#if MIN_VERSION_pretty(1,1,2)         genericTextShowSpec p-#endif-#if MIN_VERSION_pretty(1,1,2)     describe "PrettyLevel" $         matchesTextShowSpec (Proxy :: Proxy PrettyLevel)-#endif-#if MIN_VERSION_pretty(1,1,3)     describe "AnnotDetails Int" $         matchesTextShowSpec (Proxy :: Proxy (AnnotDetails Int))     describe "Doc Int (annotated)" $@@ -79,7 +62,6 @@         matchesTextShowSpec (Proxy :: Proxy Annot.PrettyLevel)     describe "Span Int" $         matchesTextShowSpec (Proxy :: Proxy (Span Int))-#endif  -- | Verifies that the output of 'renderStyle' and 'renderStyleB' coincides. -- prop_renderStyle :: Style -> Doc -> Expectation
tests/Spec/Utils.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP                 #-} {-# LANGUAGE FlexibleContexts    #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -15,14 +14,12 @@ module Spec.Utils (       matchesTextShowSpec     , matchesTextShow1Spec-#if defined(NEW_FUNCTOR_CLASSES)     , matchesTextShow2Spec-#endif     , genericTextShowSpec     , genericTextShow1Spec     ) where -import Data.Functor.Classes (Show1, showsPrec1)+import Data.Functor.Classes (Show1, Show2, showsPrec1, showsPrec2) import Data.Proxy (Proxy(..))  import Generics.Deriving.Base@@ -31,14 +28,10 @@ import Test.Hspec.QuickCheck (prop) import Test.QuickCheck (Arbitrary) -import TextShow (TextShow(..), TextShow1(..), showbPrec1, fromString)+import TextShow (TextShow(..), TextShow1(..), TextShow2(..),+                 showbPrec1, showbPrec2, fromString) import TextShow.Generic -#if defined(NEW_FUNCTOR_CLASSES)-import Data.Functor.Classes (Show2, showsPrec2)-import TextShow (TextShow2(..), showbPrec2)-#endif- -- | Expect a type's 'Show' instances to coincide for both 'String's and 'Text', -- irrespective of precedence. matchesTextShowSpec :: forall a. (Arbitrary a, Show a, TextShow a)@@ -48,7 +41,7 @@ -- | Verifies that a type's 'Show' instances coincide for both 'String's and 'Text', -- irrespective of precedence. prop_matchesTextShow :: (Show a, TextShow a) => Int -> a -> Expectation-prop_matchesTextShow p x = fromString (showsPrec p x "") `shouldBe` showbPrec p x+prop_matchesTextShow p x = showbPrec p x `shouldBe` fromString (showsPrec p x "")  -- | Expect a type's 'Show1' instances to coincide for both 'String's and 'Text', -- irrespective of precedence.@@ -60,9 +53,8 @@ -- | Verifies that a type's 'Show1' instances coincide for both 'String's and 'Text', -- irrespective of precedence. prop_matchesTextShow1 :: (Show1 f, Show a, TextShow1 f, TextShow a) => Int -> f a -> Expectation-prop_matchesTextShow1 p x = fromString (showsPrec1 p x "") `shouldBe` showbPrec1 p x+prop_matchesTextShow1 p x = showbPrec1 p x `shouldBe` fromString (showsPrec1 p x "") -#if defined(NEW_FUNCTOR_CLASSES) -- | Expect a type's 'Show2' instances to coincide for both 'String's and 'Text', -- irrespective of precedence. matchesTextShow2Spec :: forall f a b.@@ -75,8 +67,7 @@ -- irrespective of precedence. prop_matchesTextShow2 :: (Show2 f, Show a, Show b, TextShow2 f, TextShow a, TextShow b)                       => Int -> f a b -> Expectation-prop_matchesTextShow2 p x = fromString (showsPrec2 p x "") `shouldBe` showbPrec2 p x-#endif+prop_matchesTextShow2 p x = showbPrec2 p x `shouldBe` fromString (showsPrec2 p x "")  -- | Expect a type's 'TextShow' instance to coincide with the output produced -- by the equivalent 'Generic' functions.
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name:                text-show-instances-version:             3.9.2+version:             3.9.3 synopsis:            Additional instances for text-show description:         @text-show-instances@ is a supplemental library to @text-show@                      that provides additional @Show@ instances for data types in@@ -7,6 +7,8 @@                      encompassed by @text-show@. Currently, @text-show-instances@                      covers these libraries:                      .+                     * @<https://hackage.haskell.org/package/aeson               aeson>@+                     .                      * @<http://hackage.haskell.org/package/bifunctors           bifunctors>@                      .                      * @<http://hackage.haskell.org/package/binary               binary>@@@ -69,9 +71,7 @@ copyright:           (C) 2014-2017 Ryan Scott category:            Text build-type:          Simple-tested-with:         GHC == 7.8.4-                   , GHC == 7.10.3-                   , GHC == 8.0.2+tested-with:         GHC == 8.0.2                    , GHC == 8.2.2                    , GHC == 8.4.4                    , GHC == 8.6.5@@ -86,26 +86,12 @@   type:                git   location:            https://github.com/RyanGlScott/text-show-instances -flag base-4-9-  description:         Use base-4.9 or later.-  default:             True--flag template-haskell-2-11-  description:         Use template-haskell-2.11.0.0 or later.-  default:             True--flag new-functor-classes-  description:         Use a version of transformers or transformers-compat with a-                       modern-style Data.Functor.Classes module. This flag cannot be-                       used when building with transformers-0.4, since it comes with-                       a different version of Data.Functor.Classes.-  default: True- library   exposed-modules:     TextShow.Instances                         TextShow.Control.Applicative.Trans                        TextShow.Control.Monad.Trans+                       TextShow.Data.Aeson                        TextShow.Data.Bifunctor                        TextShow.Data.Binary                        TextShow.Data.Containers@@ -117,6 +103,7 @@                        TextShow.Data.UnorderedContainers                        TextShow.Data.UUID                        TextShow.Data.Vector+                       TextShow.GHC.LanguageExtensions.Type                        TextShow.Language.Haskell.TH                        TextShow.System.Console.Haskeline                        TextShow.System.Directory@@ -127,9 +114,6 @@                        TextShow.Text.XHtml                        TextShow.Trace.Hpc -                       -- Only exports functions if using ghc-boot-th-                       TextShow.GHC.LanguageExtensions.Type-                        -- Only exports functions if using ghc-boot-th-8.2 or later                        TextShow.GHC.ForeignSrcLang.Type @@ -140,58 +124,44 @@                        TextShow.System.Console.Terminfo                        TextShow.System.Posix   other-modules:       TextShow.Utils-  build-depends:       base-compat-batteries >= 0.10   && < 1-                     , bifunctors            >= 5.2    && < 6-                     , binary                >= 0.7.1  && < 0.9-                     , containers            >= 0.5.5  && < 0.7-                     , directory             >= 1.2.1  && < 1.4-                     , haskeline             >= 0.7.1  && < 0.9-                     , hpc                   >= 0.6    && < 0.7-                     , old-locale            >= 1      && < 1.1-                     , old-time              >= 1.1    && < 1.2-                     , pretty                >= 1.1.1  && < 1.2-                     , random                >= 1.0.1  && < 1.3-                     , scientific            >= 0.3.7  && < 0.4-                     , semigroups            >= 0.16.2 && < 1-                     , tagged                >= 0.4.4  && < 1-                     , text                  >= 0.11.1 && < 2.1-                     , text-short            >= 0.1    && < 0.2-                     , text-show             >= 3.4    && < 4-                     , time                  >= 0.1    && < 1.13-                     , unordered-containers  >= 0.2    && < 0.3-                     , uuid-types            >= 1      && < 1.1-                     , vector                >= 0.12   && < 0.14-                     , xhtml                 >= 3000.2 && < 3000.3+  build-depends:       aeson                 >= 2.0.3   && < 2.1+                     , base                  >= 4.9     && < 4.18+                     , base-compat           >= 0.10    && < 1+                     , bifunctors            >= 5.2     && < 6+                     , binary                >= 0.8.3   && < 0.9+                     , containers            >= 0.5.7.1 && < 0.7+                     , directory             >= 1.3     && < 1.4+                     , ghc-boot-th           >= 8.0     && < 9.5+                     , haskeline             >= 0.7.3   && < 0.9+                     , hpc                   >= 0.6     && < 0.7+                     , old-locale            >= 1       && < 1.1+                     , old-time              >= 1.1     && < 1.2+                     , pretty                >= 1.1.3.3 && < 1.2+                     , random                >= 1.0.1   && < 1.3+                     , scientific            >= 0.3.7   && < 0.4+                     , semigroups            >= 0.16.2  && < 1+                     , tagged                >= 0.4.4   && < 1+                     , template-haskell      >= 2.11    && < 2.20+                     , text                  >= 0.11.1  && < 2.1+                     , text-short            >= 0.1     && < 0.2+                     , text-show             >= 3.4     && < 4+                     , time                  >= 1.6.0.1 && < 1.13+                     , transformers          >= 0.5     && < 0.7+                     , unordered-containers  >= 0.2     && < 0.3+                     , uuid-types            >= 1       && < 1.1+                     , vector                >= 0.12    && < 0.14+                     , xhtml                 >= 3000.2  && < 3000.3   hs-source-dirs:      src   default-language:    Haskell2010   ghc-options:         -Wall   if impl(ghc >= 9.0)     ghc-options:       -fenable-th-splice-warnings -  if flag(base-4-9)-    build-depends:     base                  >= 4.9 && < 4.18-    cpp-options:       "-DNEW_FUNCTOR_CLASSES"-  else-    build-depends:     base                  >= 4.7 && < 4.9--  if flag(template-haskell-2-11)-    build-depends:     template-haskell      >= 2.11 && < 2.20-                     , ghc-boot-th           >= 8.0  && < 9.5-  else-    build-depends:     template-haskell      >= 2.9  && < 2.11--  if flag(new-functor-classes)-    build-depends:     transformers          (>= 0.3 && < 0.4) || (>= 0.5 && < 0.7)-                     , transformers-compat   >= 0.5 && < 1-    cpp-options:       "-DNEW_FUNCTOR_CLASSES"-  else-    build-depends:     transformers          == 0.4.*-   if os(windows)-    build-depends:     Win32                 >= 2.1    && < 2.13+    build-depends:     Win32                 >= 2.3.1.1 && < 2.13   else-    build-depends:     terminfo              >= 0.4    && < 0.5-                     , unix                  >= 2.7    && < 2.8+    build-depends:     terminfo              >= 0.4     && < 0.5+                     , unix                  >= 2.7     && < 2.8  test-suite spec   type:                exitcode-stdio-1.0@@ -201,6 +171,7 @@                        Instances.Data.Binary                        Instances.Data.Containers                        Instances.Data.Vector+                       Instances.GHC.LanguageExtensions.Type                        Instances.Language.Haskell.TH                        Instances.Miscellaneous                        Instances.System.Console.Haskeline@@ -213,9 +184,6 @@                        Instances.Utils                        Instances.Utils.GenericArbitrary -                       -- Only defines instances if using ghc-boot-th-                       Instances.GHC.LanguageExtensions.Type-                        -- Only defines instances if using ghc-boot-th-8.2 or later                        Instances.GHC.ForeignSrcLang.Type @@ -231,6 +199,7 @@                         Spec.Control.Applicative.TransSpec                        Spec.Control.Monad.TransSpec+                       Spec.Data.AesonSpec                        Spec.Data.BifunctorSpec                        Spec.Data.BinarySpec                        Spec.Data.ContainersSpec@@ -242,6 +211,7 @@                        Spec.Data.TimeSpec                        Spec.Data.UnorderedContainersSpec                        Spec.Data.UUIDSpec+                       Spec.GHC.LanguageExtensions.TypeSpec                        Spec.Language.Haskell.THSpec                        Spec.System.Console.HaskelineSpec                        Spec.System.DirectorySpec@@ -253,9 +223,6 @@                        Spec.Trace.HpcSpec                        Spec.Utils -                       -- Only defines tests if using ghc-boot-th-                       Spec.GHC.LanguageExtensions.TypeSpec-                        -- Only exports functions if using ghc-boot-th-8.2 or later                        Spec.GHC.ForeignSrcLang.TypeSpec @@ -265,54 +232,41 @@                        -- Only defines tests if not using Windows                        Spec.System.Console.TerminfoSpec                        Spec.System.PosixSpec-  build-depends:       base-compat-batteries >= 0.10   && < 1-                     , bifunctors            >= 5.5.5  && < 6-                     , binary                >= 0.7.1  && < 0.9-                     , containers            >= 0.5.5  && < 0.7-                     , directory             >= 1.2.1  && < 1.4-                     , generic-deriving      >= 1.9    && < 2+  build-depends:       aeson                 >= 2.0.3   && < 2.1+                     , base                  >= 4.9     && < 4.18+                     , base-compat           >= 0.10    && < 1+                     , bifunctors            >= 5.5.5   && < 6+                     , binary                >= 0.8.3   && < 0.9+                     , containers            >= 0.5.7.1 && < 0.7+                     , directory             >= 1.3     && < 1.4+                     , generic-deriving      >= 1.9     && < 2+                     , ghc-boot-th           >= 8.0     && < 9.5                      , ghc-prim-                     , haskeline             >= 0.7.1  && < 0.9-                     , hpc                   >= 0.6    && < 0.7-                     , hspec                 >= 2      && < 3-                     , old-locale            >= 1      && < 1.1-                     , old-time              >= 1.1    && < 1.2-                     , pretty                >= 1.1.1  && < 1.2-                     , QuickCheck            >= 2.12   && < 2.15-                     , quickcheck-instances  >= 0.3.27 && < 0.4-                     , random                >= 1.0.1  && < 1.3-                     , tagged                >= 0.4.4  && < 1-                     , scientific            >= 0.3.7  && < 0.4-                     , text-short            >= 0.1    && < 0.2-                     , text-show             >= 3.10   && < 4+                     , haskeline             >= 0.7.3   && < 0.9+                     , hpc                   >= 0.6     && < 0.7+                     , hspec                 >= 2       && < 3+                     , old-locale            >= 1       && < 1.1+                     , old-time              >= 1.1     && < 1.2+                     , pretty                >= 1.1.3.3 && < 1.2+                     , QuickCheck            >= 2.12    && < 2.15+                     , quickcheck-instances  >= 0.3.27  && < 0.4+                     , random                >= 1.0.1   && < 1.3+                     , tagged                >= 0.4.4   && < 1+                     , scientific            >= 0.3.7   && < 0.4+                     , template-haskell      >= 2.11    && < 2.20+                     , text-short            >= 0.1     && < 0.2+                     , text-show             >= 3.10    && < 4                      , text-show-instances-                     , th-orphans            >= 0.13.8 && < 1-                     , time                  >= 0.1    && < 1.13-                     , transformers-compat   >= 0.5    && < 1-                     , unordered-containers  >= 0.2    && < 0.3-                     , uuid-types            >= 1      && < 1.1-                     , vector                >= 0.9    && < 0.14-                     , xhtml                 >= 3000.2 && < 3000.3+                     , th-orphans            >= 0.13.8  && < 1+                     , time                  >= 1.6.0.1 && < 1.13+                     , transformers          >= 0.5     && < 0.7+                     , transformers-compat   >= 0.5     && < 1+                     , unordered-containers  >= 0.2     && < 0.3+                     , uuid-types            >= 1       && < 1.1+                     , vector                >= 0.9     && < 0.14+                     , xhtml                 >= 3000.2  && < 3000.3   build-tool-depends:  hspec-discover:hspec-discover -  if flag(base-4-9)-    build-depends:     base                  >= 4.9 && < 4.18-    cpp-options:       "-DNEW_FUNCTOR_CLASSES"-  else-    build-depends:     base                  >= 4.7 && < 4.9--  if flag(template-haskell-2-11)-    build-depends:     template-haskell      >= 2.11 && < 2.20-                     , ghc-boot-th           >= 8.0  && < 9.5-  else-    build-depends:     template-haskell      >= 2.9  && < 2.11--  if flag(new-functor-classes)-    build-depends:     transformers          (>= 0.3 && < 0.4) || (>= 0.5 && < 0.7)-    cpp-options:       "-DNEW_FUNCTOR_CLASSES"-  else-    build-depends:     transformers          == 0.4.*-   hs-source-dirs:      tests   default-language:    Haskell2010   ghc-options:         -Wall -threaded -rtsopts@@ -322,7 +276,7 @@     ghc-options:       -fenable-th-splice-warnings    if os(windows)-    build-depends:     Win32                 >= 2.1    && < 2.13+    build-depends:     Win32                 >= 2.3.1.1 && < 2.13   else-    build-depends:     terminfo              >= 0.4    && < 0.5-                     , unix                  >= 2.7    && < 2.8+    build-depends:     terminfo              >= 0.4     && < 0.5+                     , unix                  >= 2.7     && < 2.8