packages feed

text-show-instances 3.7 → 3.8

raw patch · 18 files changed

+193/−948 lines, 18 filesdep +text-shortdep ~basedep ~binarydep ~containers

Dependencies added: text-short

Dependency ranges changed: base, binary, containers, directory, ghc-boot-th, haskeline, hpc, old-time, pretty, quickcheck-instances, template-haskell, terminfo, transformers, unix, vector

Files

CHANGELOG.md view
@@ -1,3 +1,15 @@+## 3.8 [2019.05.02]+* Support GHC 8.8.+* Add a `TextShow` instance for `ShortText` (from the `text-short` package) in+  `TextShow.Data.ShortText`.+* Drop support for `base-4.5` and `base-4.6` (GHC 7.4 and 7.6, respectively).+* `liftShowbTaggedPrec` is no longer exported from `TextShow.Data.Tagged`. Use+  `Tagged`'s `TextShow1` instance instead.+* `showbVectorGenericPrec` and `liftShowbVectorGenericPrec` are no longer+  exported from `TextShow.Data.Vector`. Use the various `TextShow(1)` instances+  defined in `TextShow.Data.Vector` instead.+* Require `vector-0.12` or later.+ ## 3.7 [2018.10.07] * Remove `hoopl` dependency. Instances are no longer provided for data types   in the `hoopl` library.
src/TextShow/Data/Binary.hs view
@@ -1,8 +1,5 @@-{-# LANGUAGE CPP               #-}-#if MIN_VERSION_binary(0,6,0) {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-}-#endif  {-| Module:      TextShow.Data.Binary@@ -18,7 +15,6 @@ -} module TextShow.Data.Binary () where -#if MIN_VERSION_binary(0,6,0) import Data.Binary.Get.Internal (Decoder(..))  import Prelude ()@@ -41,4 +37,3 @@         go sp (Done _ a)      = "Done: " <> sp a         go _  (BytesRead _ _) = "BytesRead"     {-# INLINE liftShowbPrec #-}-#endif
+ src/TextShow/Data/ShortText.hs view
@@ -0,0 +1,24 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-|+Module:      TextShow.Data.ShortText+Copyright:   (C) 2014-2018 Ryan Scott+License:     BSD-style (see the file LICENSE)+Maintainer:  Ryan Scott+Stability:   Provisional+Portability: GHC++'TextShow' instance for 'ShortText' (from the @text-short@ package).++/Since: next/+-}+module TextShow.Data.ShortText () where++import           Data.Text.Short    (ShortText, toString)++import           TextShow           (TextShow (showb))+import           TextShow.Data.Char (showbString)++-- | /Since: 3.8/+instance TextShow ShortText where+    showb = showbString . toString+    {-# INLINE showb #-}
src/TextShow/Data/Tagged.hs view
@@ -18,7 +18,7 @@  /Since: 2/ -}-module TextShow.Data.Tagged (liftShowbTaggedPrec) where+module TextShow.Data.Tagged () where  import Data.Tagged (Tagged(..)) import TextShow (TextShow(..), TextShow1(..), TextShow2(..),
src/TextShow/Data/Time.hs view
@@ -23,7 +23,6 @@ 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 (NumericPadOption) import Data.Time.LocalTime (TimeZone(..), TimeOfDay(..), LocalTime(..), ZonedTime(..),                             ut1ToLocalTime, utc, utcToLocalTime, utcToZonedTime) @@ -47,6 +46,8 @@ #if MIN_VERSION_time(1,8,0) import Data.Time.Clock.System (SystemTime) #endif++type NumericPadOption = Maybe Char  pad1 :: NumericPadOption -> Builder -> Builder pad1 (Just c) b = singleton c <> b
src/TextShow/Data/Vector.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP             #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-|@@ -13,17 +12,10 @@  /Since: 2/ -}-module TextShow.Data.Vector (-      showbVectorGenericPrec-    , liftShowbVectorGenericPrec-    ) where+module TextShow.Data.Vector () where  import qualified Data.Vector as B (Vector)-#if MIN_VERSION_vector(0,11,0) import           Data.Vector.Fusion.Bundle.Size (Size)-#else-import           Data.Vector.Fusion.Stream.Size (Size)-#endif import qualified Data.Vector.Generic as G (Vector) import           Data.Vector.Generic (toList) import qualified Data.Vector.Primitive as P (Vector)@@ -36,58 +28,40 @@  import           TextShow (TextShow(..), TextShow1(..), Builder) import           TextShow.TH (deriveTextShow)-#if !(MIN_VERSION_vector(0,11,0))-import           TextShow.Utils (showbUnaryList, showbUnaryListWith)-#endif --- | Convert a generic 'G.Vector' to a 'Builder' with the given precedence.--- Note that with @vector-0.11@ and above, the precedence argument is ignored.------ /Since: 2/-showbVectorGenericPrec :: (G.Vector v a, TextShow a) => Int -> v a -> Builder-#if MIN_VERSION_vector(0,11,0)-showbVectorGenericPrec _ = showbList . toList-#else-showbVectorGenericPrec p = showbUnaryListWith showbList p . toList-#endif+-- | Convert a generic 'G.Vector' to a 'Builder'.+showbVectorGenericPrec :: (G.Vector v a, TextShow a) => v a -> Builder+showbVectorGenericPrec = showbList . toList {-# INLINE showbVectorGenericPrec #-} --- | Convert a generic 'G.Vector' to a 'Builder' with the given show function--- and precedence.--- Note that with @vector-0.11@ and above, the precedence argument is ignored.------ /Since: 3/-liftShowbVectorGenericPrec :: G.Vector v a => ([a] -> Builder) -> Int -> v a -> Builder-#if MIN_VERSION_vector(0,11,0)-liftShowbVectorGenericPrec sl _ = sl . toList-#else-liftShowbVectorGenericPrec sl p = showbUnaryListWith sl p . toList-#endif+-- | Convert a generic 'G.Vector' to a 'Builder' with the given show function.+liftShowbVectorGenericPrec :: G.Vector v a => ([a] -> Builder) -> v a -> Builder+liftShowbVectorGenericPrec sl = sl . toList {-# INLINE liftShowbVectorGenericPrec #-}  -- | /Since: 2/ instance TextShow a => TextShow (B.Vector a) where-    showbPrec = showbVectorGenericPrec+    showbPrec _ = showbVectorGenericPrec     {-# INLINE showbPrec #-}  -- | /Since: 2/ instance TextShow1 B.Vector where-    liftShowbPrec _ sl = liftShowbVectorGenericPrec sl+    liftShowbPrec _ sl _ = liftShowbVectorGenericPrec sl     {-# INLINE liftShowbPrec #-}  -- | /Since: 2/ instance (TextShow a, Prim a) => TextShow (P.Vector a) where-    showbPrec = showbVectorGenericPrec+    showbPrec _ = showbVectorGenericPrec     {-# INLINE showbPrec #-}  -- | /Since: 2/ instance (TextShow a, Storable a) => TextShow (S.Vector a) where-    showbPrec = showbVectorGenericPrec+    showbPrec _ = showbVectorGenericPrec     {-# INLINE showbPrec #-}  -- | /Since: 2/ instance (TextShow a, Unbox a) => TextShow (U.Vector a) where-    showbPrec = showbVectorGenericPrec+    showbPrec _ = showbVectorGenericPrec     {-# INLINE showbPrec #-}  -- | /Since: 2/
src/TextShow/Language/Haskell/TH.hs view
@@ -100,6 +100,10 @@                             else False  -- | /Since: 2/+$(deriveTextShow ''AnnLookup)+-- | /Since: 2/+$(deriveTextShow ''AnnTarget)+-- | /Since: 2/ $(deriveTextShow ''Body) -- | /Since: 2/ $(deriveTextShow ''Callconv)@@ -128,6 +132,8 @@ -- | /Since: 2/ $(deriveTextShow ''Info) -- | /Since: 2/+$(deriveTextShow ''Inline)+-- | /Since: 2/ $(deriveTextShow ''Lit) -- | /Since: 2/ $(deriveTextShow ''Loc)@@ -135,6 +141,10 @@ $(deriveTextShow ''Match) -- | /Since: 2/ $(deriveTextShow ''ModName)+-- | /Since: 2/+$(deriveTextShow ''Module)+-- | /Since: 2/+$(deriveTextShow ''ModuleInfo)  -- | /Since: 2/ instance TextShow Name where@@ -149,78 +159,35 @@ -- | /Since: 2/ $(deriveTextShow ''Pat) -- | /Since: 2/+$(deriveTextShow ''Phases)+-- | /Since: 2/ $(deriveTextShow ''PkgName) -- | /Since: 2/ $(deriveTextShow ''Pragma) -- | /Since: 2/ $(deriveTextShow ''Range) -- | /Since: 2/+$(deriveTextShow ''Role)+-- | /Since: 2/+$(deriveTextShow ''RuleBndr)+-- | /Since: 2/+$(deriveTextShow ''RuleMatch)+-- | /Since: 2/ $(deriveTextShow ''Safety) -- | /Since: 2/ $(deriveTextShow ''Stmt) -- | /Since: 2/+$(deriveTextShow ''TyLit)+-- | /Since: 2/ $(deriveTextShow ''Type) -- | /Since: 2/+$(deriveTextShow ''TySynEqn)+-- | /Since: 2/ $(deriveTextShow ''TyVarBndr)  -- | /Since: 2/ instance TextShow Doc where     showb = renderB . to_HPJ_Doc--#if MIN_VERSION_template_haskell(2,8,0)--- | Only available with @template-haskell-2.8.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''Inline)--- | Only available with @template-haskell-2.8.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''Phases)--- | Only available with @template-haskell-2.8.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''RuleBndr)--- | Only available with @template-haskell-2.8.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''RuleMatch)--- | Only available with @template-haskell-2.8.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''TyLit)-#else--- | /Since: 2/-$(deriveTextShow ''InlineSpec)--- | /Since: 2/-$(deriveTextShow ''Kind)-#endif--#if MIN_VERSION_template_haskell(2,9,0)--- | Only available with @template-haskell-2.9.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''AnnLookup)--- | Only available with @template-haskell-2.9.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''AnnTarget)--- | Only available with @template-haskell-2.9.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''Module)--- | Only available with @template-haskell-2.9.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''ModuleInfo)--- | Only available with @template-haskell-2.9.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''Role)--- | Only available with @template-haskell-2.9.0.0@ or later.------ /Since: 2/-$(deriveTextShow ''TySynEqn)-#endif  #if !(MIN_VERSION_template_haskell(2,10,0)) -- | Only available with @template-haskell-2.10@ or earlier.
tests/Instances/Data/Binary.hs view
@@ -1,11 +1,7 @@ {-# LANGUAGE CPP                #-}-#if MIN_VERSION_binary(0,6,0) {-# LANGUAGE DeriveGeneric      #-} {-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE TemplateHaskell    #-}-{-# LANGUAGE TypeFamilies       #-} {-# OPTIONS_GHC -fno-warn-orphans #-}-#endif {-| Module:      Instances.Data.Binary Copyright:   (C) 2014-2017 Ryan Scott@@ -18,26 +14,16 @@ -} module Instances.Data.Binary () where -#if MIN_VERSION_binary(0,6,0)-import           Data.Binary.Get.Internal (Decoder(..))+import Data.Binary.Get.Internal (Decoder(..)) -# if __GLASGOW_HASKELL__ >= 706-import           GHC.Generics (Generic)-# else-import qualified Generics.Deriving.TH as Generics (deriveAll0)-# endif+import GHC.Generics (Generic) -import           Instances.Utils.GenericArbitrary (genericArbitrary)+import Instances.Utils.GenericArbitrary (genericArbitrary) -import           Test.QuickCheck (Arbitrary(..))-import           Test.QuickCheck.Instances ()+import Test.QuickCheck (Arbitrary(..))+import Test.QuickCheck.Instances ()  instance Arbitrary a => Arbitrary (Decoder a) where     arbitrary = genericArbitrary -# if __GLASGOW_HASKELL__ >= 706 deriving instance Generic (Decoder a)-# else-$(Generics.deriveAll0 ''Decoder)-# endif-#endif
+ tests/Instances/Data/ShortText.hs view
@@ -0,0 +1,24 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}++{-|+Module:      Instances.Data.ShortText+Copyright:   (C) 2014-2018 Ryan Scott+License:     BSD-style (see the file LICENSE)+Maintainer:  Ryan Scott+Stability:   Provisional+Portability: GHC++Provides an 'Arbitrary' instance for 'ShortText' values.++-}++module Instances.Data.ShortText () where++import           Data.Text.Short (ShortText, fromString)+import           Prelude         ()+import           Prelude.Compat++import           Test.QuickCheck (Arbitrary (..))++instance Arbitrary ShortText where+    arbitrary = fromString <$> arbitrary
tests/Instances/Data/Vector.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP                #-} {-# LANGUAGE DeriveGeneric      #-} {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-}@@ -14,11 +13,7 @@ -} module Instances.Data.Vector () where -#if MIN_VERSION_vector(0,11,0) import           Data.Vector.Fusion.Bundle.Size (Size(..))-#else-import           Data.Vector.Fusion.Stream.Size (Size(..))-#endif import           Data.Vector.Generic (fromList) import qualified Data.Vector.Primitive as P (Vector) import           Data.Vector.Primitive (Prim)
tests/Instances/Language/Haskell/TH.hs view
@@ -1,9 +1,6 @@-{-# LANGUAGE CPP                        #-} {-# LANGUAGE FlexibleInstances          #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE MagicHash                  #-} {-# LANGUAGE StandaloneDeriving         #-}-{-# LANGUAGE TypeSynonymInstances       #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module:      Instances.Language.Haskell.TH@@ -17,309 +14,16 @@ -} module Instances.Language.Haskell.TH () where -import Instances.Utils ((<@>)) import Instances.Utils.GenericArbitrary (genericArbitrary)  import Language.Haskell.TH.Instances () import Language.Haskell.TH.PprLib (Doc, text) import Language.Haskell.TH.Syntax-#if !(MIN_VERSION_template_haskell(2,8,0))-import Language.Haskell.TH.Syntax.Internals-#endif  import Prelude () import Prelude.Compat -import Test.QuickCheck (Arbitrary(..), arbitraryBoundedEnum, oneof)--instance Arbitrary Body where-    arbitrary = oneof $ map pure [ GuardedB [(fGuard, fExp)]-                                 , NormalB  fExp-                                 ]---     arbitrary = oneof [GuardedB <$> arbitrary, NormalB <$> arbitrary]--deriving instance Bounded Callconv-deriving instance Enum Callconv-instance Arbitrary Callconv where-    arbitrary = arbitraryBoundedEnum--instance Arbitrary Clause where-    arbitrary = pure $ Clause [fPat] fBody [fDec]---     arbitrary = Clause <$> arbitrary <*> arbitrary <*> arbitrary--instance Arbitrary Con where-    arbitrary = oneof [ NormalC  <$> arbitrary <*> arbitrary-                      , RecC     <$> arbitrary <*> arbitrary-                      , InfixC   <$> arbitrary <*> arbitrary <*> arbitrary-                      , ForallC  <$> arbitrary <@> [fPred]   <@> fCon-#if MIN_VERSION_template_haskell(2,11,0)-                      , GadtC    <$> arbitrary <*> arbitrary <*> arbitrary-                      , RecGadtC <$> arbitrary <*> arbitrary <*> arbitrary-#endif-                      ]---     arbitrary = oneof [ NormalC <$> arbitrary <*> arbitrary---                       , RecC    <$> arbitrary <*> arbitrary---                       , InfixC  <$> arbitrary <*> arbitrary <*> arbitrary---                       , ForallC <$> arbitrary <*> arbitrary <*> arbitrary---                       ]--instance Arbitrary Dec where-    arbitrary = oneof [-          FunD <$> arbitrary <@> [fClause]-        , pure $ ValD fPat fBody [fDec]-        , DataD [fPred] <$> arbitrary-                        <*> arbitrary-#if MIN_VERSION_template_haskell(2,11,0)-                        <*> arbitrary-#endif-                        <*> arbitrary-                        <*> arbitrary-        , NewtypeD [fPred] <$> arbitrary-                           <*> arbitrary-#if MIN_VERSION_template_haskell(2,11,0)-                           <*> arbitrary-#endif-                           <*> arbitrary-                           <*> arbitrary-        , TySynD <$> arbitrary <*> arbitrary <*> arbitrary-        , ClassD [fPred] <$> arbitrary <*> arbitrary <*> arbitrary <@> [fDec]-        , pure InstanceD-#if MIN_VERSION_template_haskell(2,11,0)-                         <*> arbitrary-#endif-                         <@> [fPred]-                         <*> arbitrary-                         <@> [fDec]-        , SigD <$> arbitrary <*> arbitrary-        , ForeignD <$> arbitrary-        , PragmaD <$> arbitrary-        , DataInstD [fPred] <$> arbitrary-                            <*> arbitrary-#if MIN_VERSION_template_haskell(2,11,0)-                            <*> arbitrary-#endif-                            <*> arbitrary-                            <*> arbitrary-        , NewtypeInstD [fPred] <$> arbitrary-                               <*> arbitrary-#if MIN_VERSION_template_haskell(2,11,0)-                               <*> arbitrary-#endif-                               <*> arbitrary-                               <*> arbitrary-#if MIN_VERSION_template_haskell(2,8,0)-        , InfixD <$> arbitrary <*> arbitrary-#endif-#if MIN_VERSION_template_haskell(2,9,0)-        , ClosedTypeFamilyD <$> arbitrary-                            <*> arbitrary-# if !(MIN_VERSION_template_haskell(2,11,0))-                            <*> arbitrary-                            <*> arbitrary-# endif-        , RoleAnnotD <$> arbitrary <*> arbitrary-        , TySynInstD <$> arbitrary <*> arbitrary-#else-        , TySynInstD <$> arbitrary <*> arbitrary <*> arbitrary-#endif-#if MIN_VERSION_template_haskell(2,10,0)-        , StandaloneDerivD <$> arbitrary-                           <*> arbitrary-# if MIN_VERSION_template_haskell(2,12,0)-                           <*> arbitrary-# endif-        , DefaultSigD <$> arbitrary <*> arbitrary-#endif-#if MIN_VERSION_template_haskell(2,11,0)-        , DataFamilyD <$> arbitrary <*> arbitrary <*> arbitrary-        , OpenTypeFamilyD <$> arbitrary-#else-        , FamilyD <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary-#endif-#if MIN_VERSION_template_haskell(2,12,0)-        , PatSynD <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary-        , PatSynSigD <$> arbitrary <*> arbitrary-#endif-        ]---     arbitrary = oneof [---           FunD              <$> arbitrary <*> arbitrary---         , ValD              <$> arbitrary <*> arbitrary <*> arbitrary---         , DataD             <$> arbitrary <*> arbitrary <*> arbitrary---                             <*> arbitrary <*> arbitrary---         , NewtypeD          <$> arbitrary <*> arbitrary <*> arbitrary---                             <*> arbitrary <*> arbitrary---         , TySynD            <$> arbitrary <*> arbitrary <*> arbitrary---         , ClassD            <$> arbitrary <*> arbitrary <*> arbitrary---                             <*> arbitrary <*> arbitrary---         , InstanceD         <$> arbitrary <*> arbitrary <*> arbitrary---         , SigD              <$> arbitrary <*> arbitrary---         , ForeignD          <$> arbitrary---         , PragmaD           <$> arbitrary---         , FamilyD           <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary---         , DataInstD         <$> arbitrary <*> arbitrary <*> arbitrary---                             <*> arbitrary <*> arbitrary---         , NewtypeInstD      <$> arbitrary <*> arbitrary <*> arbitrary---                             <*> arbitrary <*> arbitrary--- #if MIN_VERSION_template_haskell(2,8,0)---         , InfixD            <$> arbitrary <*> arbitrary--- #endif--- #if MIN_VERSION_template_haskell(2,9,0)---         , ClosedTypeFamilyD <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary---         , RoleAnnotD        <$> arbitrary <*> arbitrary---         , TySynInstD        <$> arbitrary <*> arbitrary--- #else---         , TySynInstD        <$> arbitrary <*> arbitrary <*> arbitrary--- #endif--- #if MIN_VERSION_template_haskell(2,10,0)---         , StandaloneDerivD  <$> arbitrary <*> arbitrary---         , DefaultSigD       <$> arbitrary <*> arbitrary--- #endif---         ]--instance Arbitrary Exp where-    arbitrary = oneof [ VarE <$> arbitrary-                      , ConE <$> arbitrary-                      , LitE <$> arbitrary-                      , pure $ AppE fExp fExp-                      , pure $ InfixE (Just fExp) fExp (Just fExp)-                      , pure $ LamE [fPat] fExp-                      , pure $ TupE [fExp]-                      , pure $ CondE fExp fExp fExp-                      , pure $ LetE [fDec] fExp-                      , pure $ CaseE fExp [fMatch]-                      , pure $ DoE [fStmt]-                      , pure $ CompE [fStmt]-                      , pure $ ArithSeqE fRange-                      , pure $ ListE [fExp]-                      , SigE fExp <$> arbitrary-                      , RecConE <$> arbitrary <@> [fFieldExp]-                      , pure $ RecUpdE fExp [fFieldExp]-                      , pure $ UnboxedTupE [fExp]-                      , pure $ UInfixE fExp fExp fExp-                      , pure $ ParensE fExp-#if MIN_VERSION_template_haskell(2,8,0)-                      , pure $ LamCaseE [fMatch]-                      , pure $ MultiIfE [(fGuard, fExp)]-#endif-#if MIN_VERSION_template_haskell(2,10,0)-                      , pure $ StaticE fExp-#endif-#if MIN_VERSION_template_haskell(2,11,0)-                      , UnboundVarE <$> arbitrary-#endif-#if MIN_VERSION_template_haskell(2,12,0)-                      , pure $ AppTypeE fExp fType-                      , UnboxedSumE fExp <$> arbitrary <*> arbitrary-#endif-#if MIN_VERSION_template_haskell(2,13,0)-                      , LabelE <$> arbitrary-#endif-                      ]---     arbitrary = oneof [ VarE        <$> arbitrary---                       , ConE        <$> arbitrary---                       , LitE        <$> arbitrary---                       , AppE        <$> arbitrary <*> arbitrary---                       , InfixE      <$> arbitrary <*> arbitrary <*> arbitrary---                       , LamE        <$> arbitrary <*> arbitrary---                       , TupE        <$> arbitrary---                       , CondE       <$> arbitrary <*> arbitrary <*> arbitrary---                       , LetE        <$> arbitrary <*> arbitrary---                       , CaseE       <$> arbitrary <*> arbitrary---                       , DoE         <$> arbitrary---                       , CompE       <$> arbitrary---                       , ArithSeqE   <$> arbitrary---                       , ListE       <$> arbitrary---                       , SigE        <$> arbitrary <*> arbitrary---                       , RecConE     <$> arbitrary <*> arbitrary---                       , RecUpdE     <$> arbitrary <*> arbitrary---                       , UnboxedTupE <$> arbitrary---                       , UInfixE     <$> arbitrary <*> arbitrary <*> arbitrary---                       , ParensE     <$> arbitrary--- #if MIN_VERSION_template_haskell(2,8,0)---                       , LamCaseE    <$> arbitrary---                       , MultiIfE    <$> arbitrary--- #endif--- #if MIN_VERSION_template_haskell(2,10,0)---                       , StaticE     <$> arbitrary--- #endif---                       ]--#if !(MIN_VERSION_template_haskell(2,13,0))-deriving instance Bounded FamFlavour-deriving instance Enum FamFlavour-instance Arbitrary FamFlavour where-    arbitrary = arbitraryBoundedEnum-#endif--instance Arbitrary Fixity where-    arbitrary = genericArbitrary--deriving instance Bounded FixityDirection-deriving instance Enum FixityDirection-instance Arbitrary FixityDirection where-    arbitrary = arbitraryBoundedEnum--instance Arbitrary Foreign where-    arbitrary = genericArbitrary--instance Arbitrary FunDep where-    arbitrary = genericArbitrary--instance Arbitrary Guard where-        arbitrary = oneof $ map pure [ NormalG fExp-                                     , PatG    [fStmt]-                                     ]---     arbitrary = oneof [NormalG <$> arbitrary, PatG <$> arbitrary]--instance Arbitrary Info where-    arbitrary = oneof [-          pure $ ClassI fDec [fDec]-        , ClassOpI   <$> arbitrary-                     <*> arbitrary-                     <*> arbitrary-#if !(MIN_VERSION_template_haskell(2,11,0))-                     <*> arbitrary-#endif-        , pure $ TyConI fDec-        , PrimTyConI <$> arbitrary <*> arbitrary <*> arbitrary-        , DataConI   <$> arbitrary-                     <*> arbitrary-                     <*> arbitrary-#if !(MIN_VERSION_template_haskell(2,11,0))-                     <*> arbitrary-#endif-        , VarI       <$> arbitrary-                     <*> arbitrary-                     <*> arbitrary-#if !(MIN_VERSION_template_haskell(2,11,0))-                     <*> arbitrary-#endif-        , TyVarI     <$> arbitrary <*> arbitrary-        , pure $ FamilyI fDec [fDec]-#if MIN_VERSION_template_haskell(2,12,0)-        , PatSynI    <$> arbitrary <*> arbitrary-#endif-        ]---     arbitrary = oneof [---           ClassI     <$> arbitrary <*> arbitrary---         , ClassOpI   <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary---         , TyConI     <$> arbitrary---         , PrimTyConI <$> arbitrary <*> arbitrary <*> arbitrary---         , DataConI   <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary---         , VarI       <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary---         , TyVarI     <$> arbitrary <*> arbitrary---         , FamilyI    <$> arbitrary <*> arbitrary---         ]--instance Arbitrary Lit where-    arbitrary = genericArbitrary--instance Arbitrary Loc where-    arbitrary = genericArbitrary--instance Arbitrary Match where-    arbitrary = Match <$> arbitrary <@> fBody <@> [fDec]---     arbitrary = Match <$> arbitrary <*> arbitrary <*> arbitrary+import Test.QuickCheck (Arbitrary(..), arbitraryBoundedEnum)  instance Arbitrary Name where     arbitrary = genericArbitrary@@ -338,322 +42,9 @@ instance Arbitrary NameSpace where     arbitrary = arbitraryBoundedEnum -instance Arbitrary Pat where-    arbitrary = oneof [ LitP <$> arbitrary-                      , VarP <$> arbitrary-                      , pure $ TupP [fPat]-                      , ConP <$> arbitrary <@> [fPat]-                      , InfixP fPat <$> arbitrary <@> fPat-                      , pure $ TildeP fPat-                      , pure $ BangP fPat-                      , AsP <$> arbitrary <@> fPat-                      , pure WildP-                      , RecP <$> arbitrary <@> [fFieldPat]-                      , pure $ ListP [fPat]-                      , SigP fPat <$> arbitrary-                      , pure $ ViewP fExp fPat-                      , pure $ UnboxedTupP [fPat]-                      , UInfixP fPat <$> arbitrary <@> fPat-                      , pure $ ParensP fPat-#if MIN_VERSION_template_haskell(2,12,0)-                      , UnboxedSumP fPat <$> arbitrary <*> arbitrary-#endif-                      ]---     arbitrary = oneof [ LitP        <$> arbitrary---                       , VarP        <$> arbitrary---                       , TupP        <$> arbitrary---                       , ConP        <$> arbitrary <*> arbitrary---                       , InfixP      <$> arbitrary <*> arbitrary <*> arbitrary---                       , TildeP      <$> arbitrary---                       , BangP       <$> arbitrary---                       , AsP         <$> arbitrary <*> arbitrary---                       , pure WildP---                       , RecP        <$> arbitrary <*> arbitrary---                       , ListP       <$> arbitrary---                       , SigP        <$> arbitrary <*> arbitrary---                       , ViewP       <$> arbitrary <*> arbitrary---                       , UnboxedTupP <$> arbitrary---                       , UInfixP     <$> arbitrary <*> arbitrary <*> arbitrary---                       , ParensP     <$> arbitrary---                       ]--instance Arbitrary Pragma where-    arbitrary = genericArbitrary--instance Arbitrary Range where-    arbitrary = oneof $ map pure [ FromR       fExp-                                 , FromThenR   fExp fExp-                                 , FromToR     fExp fExp-                                 , FromThenToR fExp fExp fExp-                                 ]---     arbitrary = oneof [ FromR       <$> arbitrary---                       , FromThenR   <$> arbitrary <*> arbitrary---                       , FromToR     <$> arbitrary <*> arbitrary---                       , FromThenToR <$> arbitrary <*> arbitrary <*> arbitrary---                       ]--deriving instance Bounded Safety-deriving instance Enum Safety-instance Arbitrary Safety where-    arbitrary = arbitraryBoundedEnum--instance Arbitrary Stmt where-    arbitrary = oneof $ map pure [ BindS   fPat fExp-                                 , LetS    [fDec]-                                 , NoBindS fExp-                                 , ParS    [[fStmt]]-                                 ]---     arbitrary = oneof [ BindS   <$> arbitrary <*> arbitrary---                       , LetS    <$> arbitrary---                       , NoBindS <$> arbitrary---                       , ParS    <$> arbitrary---                       ]--instance Arbitrary Type where-    arbitrary = oneof [ pure $ ForallT [fTyVarBndr] [fPred] fType-                      , VarT <$> arbitrary-                      , ConT <$> arbitrary-                      , TupleT <$> arbitrary-                      , pure ArrowT-                      , pure ListT-                      , pure $ AppT fType fType-                      , pure $ SigT fType fKind-                      , UnboxedTupleT <$> arbitrary-#if MIN_VERSION_template_haskell(2,8,0)-                      , PromotedT <$> arbitrary-                      , PromotedTupleT <$> arbitrary-                      , pure PromotedNilT-                      , pure PromotedConsT-                      , pure StarT-                      , pure ConstraintT-                      , LitT <$> arbitrary-#endif-#if MIN_VERSION_template_haskell(2,10,0)-                      , pure EqualityT-#endif-#if MIN_VERSION_template_haskell(2,11,0)-                      , InfixT  fType <$> arbitrary <@> fType-                      , UInfixT fType <$> arbitrary <@> fType-                      , pure $ ParensT fType-                      , pure WildCardT-#endif-#if MIN_VERSION_template_haskell(2,12,0)-                      , UnboxedSumT <$> arbitrary-#endif-                      ]---     arbitrary = oneof [ ForallT        <$> arbitrary <*> arbitrary <*> arbitrary---                       , VarT           <$> arbitrary---                       , ConT           <$> arbitrary---                       , TupleT         <$> arbitrary---                       , pure ArrowT---                       , pure ListT---                       , AppT           <$> arbitrary <*> arbitrary---                       , SigT           <$> arbitrary <*> arbitrary---                       , UnboxedTupleT  <$> arbitrary---                       , PromotedT      <$> arbitrary---                       , PromotedTupleT <$> arbitrary---                       , pure PromotedNilT---                       , pure PromotedConsT---                       , pure StarT---                       , pure ConstraintT---                       , LitT           <$> arbitrary--- #if MIN_VERSION_template_haskell(2,10,0)---                       , pure EqualityT--- #endif---                       ]--instance Arbitrary TyVarBndr where-    arbitrary = oneof [PlainTV  <$> arbitrary, KindedTV <$> arbitrary <@> fKind]---     arbitrary = oneof [PlainTV <$> arbitrary, KindedTV <$> arbitrary <*> arbitrary]--#if MIN_VERSION_template_haskell(2,8,0)-deriving instance Bounded Inline-deriving instance Enum Inline-instance Arbitrary Inline where-    arbitrary = arbitraryBoundedEnum--instance Arbitrary Phases where-    arbitrary = genericArbitrary--instance Arbitrary RuleBndr where-    arbitrary = genericArbitrary--deriving instance Bounded RuleMatch-deriving instance Enum RuleMatch-instance Arbitrary RuleMatch where-    arbitrary = arbitraryBoundedEnum--instance Arbitrary TyLit where-    arbitrary = genericArbitrary-#else-instance Arbitrary InlineSpec where-    arbitrary = genericArbitrary--instance Arbitrary Kind where-    arbitrary = oneof [pure StarK, pure $ ArrowK fKind fKind]---     arbitrary = oneof [pure StarK, ArrowK <$> arbitrary <*> arbitrary]-#endif--#if MIN_VERSION_template_haskell(2,9,0)-instance Arbitrary AnnLookup where-    arbitrary = genericArbitrary--instance Arbitrary AnnTarget where-    arbitrary = genericArbitrary--instance Arbitrary Module where-    arbitrary = genericArbitrary--instance Arbitrary ModuleInfo where-    arbitrary = genericArbitrary--deriving instance Bounded Role-deriving instance Enum Role-instance Arbitrary Role where-    arbitrary = arbitraryBoundedEnum--instance Arbitrary TySynEqn where-    arbitrary = genericArbitrary-#endif- instance Arbitrary Doc where     arbitrary = text <$> arbitrary -#if !(MIN_VERSION_template_haskell(2,10,0))-instance Arbitrary Pred where-    arbitrary = oneof [ ClassP <$> arbitrary <@> [fType]-                      , pure $ EqualP fType fType-                      ]---     arbitrary = oneof [ ClassP <$> arbitrary <*> arbitrary---                       , EqualP <$> arbitrary <*> arbitrary---                       ]-#endif--#if MIN_VERSION_template_haskell(2,11,0)-instance Arbitrary Bang where-    arbitrary = genericArbitrary--deriving instance Bounded DecidedStrictness-deriving instance Enum DecidedStrictness-instance Arbitrary DecidedStrictness where-    arbitrary = arbitraryBoundedEnum--instance Arbitrary FamilyResultSig where-    arbitrary = oneof [ pure NoSig-                      , pure $ KindSig fKind-                      , pure $ TyVarSig fTyVarBndr-                      ]--instance Arbitrary InjectivityAnn where-    arbitrary = pure $ InjectivityAnn fName [fName]--deriving instance Bounded Overlap-deriving instance Enum Overlap-instance Arbitrary Overlap where-    arbitrary = arbitraryBoundedEnum--deriving instance Bounded SourceStrictness-deriving instance Enum SourceStrictness-instance Arbitrary SourceStrictness where-    arbitrary = arbitraryBoundedEnum--deriving instance Bounded SourceUnpackedness-deriving instance Enum SourceUnpackedness-instance Arbitrary SourceUnpackedness where-    arbitrary = arbitraryBoundedEnum--instance Arbitrary TypeFamilyHead where-    arbitrary = TypeFamilyHead fName-                               [fTyVarBndr]-                           <$> arbitrary-                           <*> arbitrary-#else-deriving instance Bounded Strict-deriving instance Enum Strict-instance Arbitrary Strict where-    arbitrary = arbitraryBoundedEnum-#endif--#if MIN_VERSION_template_haskell(2,12,0)-instance Arbitrary DerivClause where-    arbitrary = genericArbitrary--instance Arbitrary DerivStrategy where-    arbitrary = genericArbitrary--instance Arbitrary PatSynArgs where-    arbitrary = oneof $ map pure [ PrefixPatSyn [fName]-                                 , InfixPatSyn fName fName-                                 , RecordPatSyn [fName]-                                 ]--instance Arbitrary PatSynDir where-    arbitrary = oneof $ map pure [ Unidir, ImplBidir, ExplBidir [fClause] ]-#endif- deriving instance Arbitrary ModName deriving instance Arbitrary OccName deriving instance Arbitrary PkgName------------------------------------------------------------------------------------ Workarounds to make Arbitrary instances faster----------------------------------------------------------------------------------fBody :: Body-fBody = GuardedB []--fClause :: Clause-fClause = Clause [] fBody []--fCon :: Con-fCon = NormalC fName []--fDec :: Dec-fDec = FunD fName []--fExp :: Exp-fExp = TupE []--fFieldExp :: FieldExp-fFieldExp = (fName, fExp)--fFieldPat :: FieldPat-fFieldPat = (fName, fPat)--fGuard :: Guard-fGuard = PatG []--fKind :: Kind-#if MIN_VERSION_template_haskell(2,8,0)-fKind = fType-#else-fKind = StarK-#endif--fMatch :: Match-fMatch = Match fPat fBody []--fName :: Name-fName = Name (OccName "") NameS--fPat :: Pat-fPat = WildP--fPred :: Pred-#if MIN_VERSION_template_haskell(2,10,0)-fPred = fType-#else-fPred = ClassP fName []-#endif--fRange :: Range-fRange = FromR fExp--fStmt :: Stmt-fStmt = LetS []--fType :: Type-fType = ListT--fTyVarBndr :: TyVarBndr-fTyVarBndr = PlainTV fName
tests/Instances/System/Directory.hs view
@@ -19,23 +19,21 @@ -} module Instances.System.Directory () where -#if MIN_VERSION_directory(1,1,0) 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)+#if MIN_VERSION_directory(1,2,3) import           System.Directory (XdgDirectory(..)) import           Test.QuickCheck (arbitraryBoundedEnum)-# endif+#endif  instance Arbitrary Permissions where     arbitrary = genericArbitrary $(Generics.deriveAll0 ''Permissions) -# if MIN_VERSION_directory(1,2,3)+#if MIN_VERSION_directory(1,2,3) instance Arbitrary XdgDirectory where     arbitrary = arbitraryBoundedEnum-# endif #endif
tests/Spec/Data/BinarySpec.hs view
@@ -12,32 +12,24 @@ -} module Spec.Data.BinarySpec (main, spec) where -import Prelude ()-import Prelude.Compat--import Test.Hspec (Spec, hspec, parallel)--#if MIN_VERSION_binary(0,6,0) import Data.Binary.Get.Internal (Decoder) import Data.Proxy (Proxy(..))  import Instances.Data.Binary () +import Prelude ()+import Prelude.Compat+ import Spec.Utils (matchesTextShowSpec) -import Test.Hspec (describe)+import Test.Hspec (Spec, describe, hspec, parallel)  import TextShow.Data.Binary ()-#endif  main :: IO () main = hspec spec  spec :: Spec spec = parallel $ do-#if MIN_VERSION_binary(0,6,0)     describe "Decoder Int" $         matchesTextShowSpec (Proxy :: Proxy (Decoder Int))-#else-    pure ()-#endif
+ tests/Spec/Data/ShortTextSpec.hs view
@@ -0,0 +1,30 @@+{-|+Module:      Spec.Data.ShortTextSpec+Copyright:   (C) 2014-2018 Ryan Scott+License:     BSD-style (see the file LICENSE)+Maintainer:  Ryan Scott+Stability:   Provisional+Portability: GHC++@hspec@ tests for 'ShortText' (from the @text-short@ package).+-}+module Spec.Data.ShortTextSpec (main, spec) where++import           Data.Proxy               (Proxy (..))+import           Data.Text.Short          (ShortText)++import           Instances.Data.ShortText ()++import           Spec.Utils               (matchesTextShowSpec)++import           Test.Hspec               (Spec, describe, hspec, parallel)++import           TextShow.Data.ShortText  ()++main :: IO ()+main = hspec spec++spec :: Spec+spec = parallel $ do+    describe "ShortText" $+        matchesTextShowSpec (Proxy :: Proxy ShortText)
tests/Spec/Data/VectorSpec.hs view
@@ -14,11 +14,7 @@  import           Data.Proxy (Proxy(..)) import qualified Data.Vector as B (Vector)-#if MIN_VERSION_vector(0,11,0) import           Data.Vector.Fusion.Bundle.Size (Size)-#else-import           Data.Vector.Fusion.Stream.Size (Size)-#endif import qualified Data.Vector.Primitive as P (Vector) import qualified Data.Vector.Storable as S (Vector) import qualified Data.Vector.Unboxed as U (Vector)@@ -26,7 +22,7 @@ import           Instances.Data.Vector ()  import           Spec.Utils (matchesTextShowSpec)-#if MIN_VERSION_base(4,9,0) && MIN_VERSION_vector(0,12,0)+#if MIN_VERSION_base(4,9,0) import           Spec.Utils (matchesTextShow1Spec) #endif @@ -43,7 +39,7 @@         let p :: Proxy (B.Vector Char)             p = Proxy         matchesTextShowSpec  p-#if MIN_VERSION_base(4,9,0) && MIN_VERSION_vector(0,12,0)+#if MIN_VERSION_base(4,9,0)         matchesTextShow1Spec p #endif     describe "(primitive) Vector Char" $
tests/Spec/Language/Haskell/THSpec.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-| Module:      Spec.Language.Haskell.THSpec Copyright:   (C) 2014-2017 Ryan Scott@@ -31,87 +30,10 @@  spec :: Spec spec = parallel $ do-#if MIN_VERSION_template_haskell(2,9,0)-    describe "AnnLookup" $-        matchesTextShowSpec (Proxy :: Proxy AnnLookup)-    describe "AnnTarget" $-        matchesTextShowSpec (Proxy :: Proxy AnnTarget)-#endif-#if MIN_VERSION_template_haskell(2,11,0)-    describe "Bang" $-        matchesTextShowSpec (Proxy :: Proxy Bang)-#endif-    describe "Body" $-        matchesTextShowSpec (Proxy :: Proxy Body)-    describe "Callconv" $-        matchesTextShowSpec (Proxy :: Proxy Callconv)-    describe "Clause" $-        matchesTextShowSpec (Proxy :: Proxy Clause)-    describe "Con" $-        matchesTextShowSpec (Proxy :: Proxy Con)-    describe "Dec" $-        matchesTextShowSpec (Proxy :: Proxy Dec)-#if MIN_VERSION_template_haskell(2,11,0)-    describe "DecidedStrictness" $-        matchesTextShowSpec (Proxy :: Proxy DecidedStrictness)-#endif-#if MIN_VERSION_template_haskell(2,12,0)-    describe "DerivClause" $-        matchesTextShowSpec (Proxy :: Proxy DerivClause)-    describe "DerivStrategy" $-        matchesTextShowSpec (Proxy :: Proxy DerivStrategy)-#endif     describe "Doc" $         matchesTextShowSpec (Proxy :: Proxy Doc)-    describe "Exp" $-        matchesTextShowSpec (Proxy :: Proxy Exp)-#if !(MIN_VERSION_template_haskell(2,13,0))-    describe "FamFlavour" $-        matchesTextShowSpec (Proxy :: Proxy FamFlavour)-#endif-#if MIN_VERSION_template_haskell(2,11,0)-    describe "FamilyResultSig" $-        matchesTextShowSpec (Proxy :: Proxy FamilyResultSig)-#endif-    describe "Fixity" $-        matchesTextShowSpec (Proxy :: Proxy Fixity)-    describe "FixityDirection" $-        matchesTextShowSpec (Proxy :: Proxy FixityDirection)-    describe "Foreign" $-        matchesTextShowSpec (Proxy :: Proxy Foreign)-    describe "FunDep" $-        matchesTextShowSpec (Proxy :: Proxy FunDep)-    describe "Guard" $-        matchesTextShowSpec (Proxy :: Proxy Guard)-    describe "Info" $-        matchesTextShowSpec (Proxy :: Proxy Info)-#if MIN_VERSION_template_haskell(2,11,0)-    describe "InjectivityAnn" $-        matchesTextShowSpec (Proxy :: Proxy InjectivityAnn)-#endif-#if MIN_VERSION_template_haskell(2,8,0)-    describe "Inline" $-        matchesTextShowSpec (Proxy :: Proxy Inline)-#else-    describe "InlineSpec" $-        matchesTextShowSpec (Proxy :: Proxy InlineSpec)-#endif-    describe "Kind" $-        matchesTextShowSpec (Proxy :: Proxy Kind)-    describe "Lit" $-        matchesTextShowSpec (Proxy :: Proxy Lit)-    describe "Loc" $-        matchesTextShowSpec (Proxy :: Proxy Loc)-    describe "Match" $-        matchesTextShowSpec (Proxy :: Proxy Match)     describe "ModName" $         matchesTextShowSpec (Proxy :: Proxy ModName)-#if MIN_VERSION_template_haskell(2,9,0)-    describe "Module" $-        matchesTextShowSpec (Proxy :: Proxy Module)-    describe "ModuleInfo" $-        matchesTextShowSpec (Proxy :: Proxy ModuleInfo)-#endif     describe "Name" $         matchesTextShowSpec (Proxy :: Proxy Name)     describe "showbName'" $@@ -122,68 +44,8 @@         matchesTextShowSpec (Proxy :: Proxy NameSpace)     describe "OccName" $         matchesTextShowSpec (Proxy :: Proxy OccName)-#if MIN_VERSION_template_haskell(2,11,0)-    describe "Overlap" $-        matchesTextShowSpec (Proxy :: Proxy Overlap)-#endif-    describe "Pat" $-        matchesTextShowSpec (Proxy :: Proxy Pat)-#if MIN_VERSION_template_haskell(2,12,0)-    describe "PatSynArgs" $-        matchesTextShowSpec (Proxy :: Proxy PatSynArgs)-    describe "PatSynDir" $-        matchesTextShowSpec (Proxy :: Proxy PatSynDir)-#endif-#if MIN_VERSION_template_haskell(2,8,0)-    describe "Phases" $-        matchesTextShowSpec (Proxy :: Proxy Phases)-#endif     describe "PkgName" $         matchesTextShowSpec (Proxy :: Proxy PkgName)-    describe "Pred" $-        matchesTextShowSpec (Proxy :: Proxy Pred)-    describe "Pragma" $-        matchesTextShowSpec (Proxy :: Proxy Pragma)-    describe "Range" $-        matchesTextShowSpec (Proxy :: Proxy Range)-#if MIN_VERSION_template_haskell(2,9,0)-    describe "Role" $-        matchesTextShowSpec (Proxy :: Proxy Role)-#endif-#if MIN_VERSION_template_haskell(2,8,0)-    describe "RuleBndr" $-        matchesTextShowSpec (Proxy :: Proxy RuleBndr)-    describe "RuleMatch" $-        matchesTextShowSpec (Proxy :: Proxy RuleMatch)-#endif-    describe "Safety" $-        matchesTextShowSpec (Proxy :: Proxy Safety)-#if MIN_VERSION_template_haskell(2,11,0)-    describe "SourceStrictness" $-        matchesTextShowSpec (Proxy :: Proxy SourceStrictness)-    describe "SourceUnpackedness" $-        matchesTextShowSpec (Proxy :: Proxy SourceUnpackedness)-#endif-    describe "Stmt" $-        matchesTextShowSpec (Proxy :: Proxy Stmt)-    describe "Strict" $-        matchesTextShowSpec (Proxy :: Proxy Strict)-#if MIN_VERSION_template_haskell(2,8,0)-    describe "TyLit" $-        matchesTextShowSpec (Proxy :: Proxy TyLit)-#endif-    describe "Type" $-        matchesTextShowSpec (Proxy :: Proxy Type)-#if MIN_VERSION_template_haskell(2,11,0)-    describe "TypeFamilyHead" $-        matchesTextShowSpec (Proxy :: Proxy TypeFamilyHead)-#endif-#if MIN_VERSION_template_haskell(2,9,0)-    describe "TySynEqn" $-        matchesTextShowSpec (Proxy :: Proxy TySynEqn)-#endif-    describe "TyVarBndr" $-        matchesTextShowSpec (Proxy :: Proxy TyVarBndr)  -- | Verifies that `showName'` and `showbName'` have the same output. prop_showName' :: NameIs -> Name -> Bool
tests/Spec/System/DirectorySpec.hs view
@@ -11,40 +11,32 @@ -} module Spec.System.DirectorySpec (main, spec) where -import Prelude ()-import Prelude.Compat--import Test.Hspec (Spec, hspec, parallel)--#if MIN_VERSION_directory(1,1,0) import Data.Proxy (Proxy(..))  import Instances.System.Directory () +import Prelude ()+import Prelude.Compat+ import Spec.Utils (matchesTextShowSpec)  import System.Directory (Permissions)-# if MIN_VERSION_directory(1,2,3)+#if MIN_VERSION_directory(1,2,3) import System.Directory (XdgDirectory)-# endif+#endif -import Test.Hspec (describe)+import Test.Hspec (Spec, describe, hspec, parallel)  import TextShow.System.Directory ()-#endif  main :: IO () main = hspec spec  spec :: Spec spec = parallel $ do-#if MIN_VERSION_directory(1,1,0)     describe "Permissions" $         matchesTextShowSpec (Proxy :: Proxy Permissions)-# if MIN_VERSION_directory(1,2,3)+#if MIN_VERSION_directory(1,2,3)     describe "XdgDirectory" $         matchesTextShowSpec (Proxy :: Proxy XdgDirectory)-# endif-#else-    pure () #endif
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name:                text-show-instances-version:             3.7+version:             3.8 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@@ -35,6 +35,8 @@                      .                      * @<http://hackage.haskell.org/package/terminfo             terminfo>@                      .+                     * @<https://hackage.haskell.org/package/text-short          text-short>@+                     .                      * @<http://hackage.haskell.org/package/time                 time>@                      .                      * @<http://hackage.haskell.org/package/transformers         transformers>@@@ -63,14 +65,13 @@ copyright:           (C) 2014-2017 Ryan Scott category:            Text build-type:          Simple-tested-with:         GHC == 7.4.2-                   , GHC == 7.6.3-                   , GHC == 7.8.4+tested-with:         GHC == 7.8.4                    , GHC == 7.10.3                    , GHC == 8.0.2                    , GHC == 8.2.2-                   , GHC == 8.4.3-                   , GHC == 8.6.1+                   , GHC == 8.4.4+                   , GHC == 8.6.5+                   , GHC == 8.8.1 extra-source-files:  CHANGELOG.md, README.md cabal-version:       >=1.10 @@ -102,6 +103,7 @@                        TextShow.Data.Binary                        TextShow.Data.Containers                        TextShow.Data.Functor.Trans+                       TextShow.Data.ShortText                        TextShow.Data.Tagged                        TextShow.Data.Time                        TextShow.Data.UnorderedContainers@@ -131,41 +133,42 @@   other-modules:       TextShow.Utils   build-depends:       base-compat-batteries >= 0.10   && < 1                      , bifunctors            >= 5.2    && < 6-                     , binary                >= 0.5    && < 0.9-                     , containers            >= 0.1    && < 0.7-                     , directory             >= 1      && < 1.4-                     , haskeline             >= 0.7    && < 0.8-                     , hpc                   >= 0.5    && < 0.7+                     , binary                >= 0.7.1  && < 0.9+                     , containers            >= 0.5.5  && < 0.7+                     , directory             >= 1.2.1  && < 1.4+                     , haskeline             >= 0.7.1  && < 0.8+                     , hpc                   >= 0.6    && < 0.7                      , old-locale            >= 1      && < 1.1-                     , old-time              >= 1      && < 1.2-                     , pretty                >= 1      && < 1.2+                     , old-time              >= 1.1    && < 1.2+                     , pretty                >= 1.1.1  && < 1.2                      , random                >= 1.0.1  && < 1.2                      , semigroups            >= 0.16.2 && < 1                      , tagged                >= 0.4.4  && < 1                      , text                  >= 0.11.1 && < 1.3+                     , text-short            >= 0.1    && < 0.2                      , text-show             >= 3.4    && < 4                      , time                  >= 0.1    && < 1.10                      , unordered-containers  >= 0.2    && < 0.3-                     , vector                >= 0.9    && < 0.13+                     , vector                >= 0.12   && < 0.13                      , xhtml                 >= 3000.2 && < 3000.3   hs-source-dirs:      src   default-language:    Haskell2010   ghc-options:         -Wall    if flag(base-4-9)-    build-depends:     base                  >= 4.9 && < 4.13+    build-depends:     base                  >= 4.9 && < 4.14     cpp-options:       "-DNEW_FUNCTOR_CLASSES"   else-    build-depends:     base                  >= 4.5 && < 4.9+    build-depends:     base                  >= 4.7 && < 4.9    if flag(template-haskell-2-11)-    build-depends:     template-haskell      >= 2.11 && < 2.15-                     , ghc-boot-th           >= 8.0  && < 8.7+    build-depends:     template-haskell      >= 2.11 && < 2.16+                     , ghc-boot-th           >= 8.0  && < 8.9   else-    build-depends:     template-haskell      >= 2.7  && < 2.11+    build-depends:     template-haskell      >= 2.9  && < 2.11    if flag(new-functor-classes)-    build-depends:     transformers          (>= 0.2.1 && < 0.4) || (>= 0.5 && < 0.6)+    build-depends:     transformers          (>= 0.3 && < 0.4) || (>= 0.5 && < 0.6)                      , transformers-compat   >= 0.5 && < 1     cpp-options:       "-DNEW_FUNCTOR_CLASSES"   else@@ -174,8 +177,8 @@   if os(windows)     build-depends:     Win32                 >= 2.1    && < 2.9   else-    build-depends:     terminfo              >= 0.3.2  && < 0.5-                     , unix                  >= 2      && < 2.8+    build-depends:     terminfo              >= 0.4    && < 0.5+                     , unix                  >= 2.7    && < 2.8  test-suite spec   type:                exitcode-stdio-1.0@@ -186,6 +189,7 @@                        Instances.Data.Binary                        Instances.Data.Containers                        Instances.Data.Functor.Trans+                       Instances.Data.ShortText                        Instances.Data.Vector                        Instances.Language.Haskell.TH                        Instances.Miscellaneous@@ -221,6 +225,7 @@                        Spec.Data.BinarySpec                        Spec.Data.ContainersSpec                        Spec.Data.Functor.TransSpec+                       Spec.Data.ShortTextSpec                        Spec.Data.VectorSpec                        Spec.Data.TaggedSpec                        Spec.Data.TimeSpec@@ -250,21 +255,22 @@                        Spec.System.PosixSpec   build-depends:       base-compat-batteries >= 0.10   && < 1                      , bifunctors            >= 5.2    && < 6-                     , binary                >= 0.5    && < 0.9-                     , containers            >= 0.1    && < 0.7-                     , directory             >= 1      && < 1.4+                     , binary                >= 0.7.1  && < 0.9+                     , containers            >= 0.5.5  && < 0.7+                     , directory             >= 1.2.1  && < 1.4                      , generic-deriving      >= 1.9    && < 2                      , ghc-prim-                     , haskeline             >= 0.7    && < 0.8-                     , hpc                   >= 0.5    && < 0.7+                     , haskeline             >= 0.7.1  && < 0.8+                     , hpc                   >= 0.6    && < 0.7                      , hspec                 >= 2      && < 3                      , old-locale            >= 1      && < 1.1-                     , old-time              >= 1      && < 1.2-                     , pretty                >= 1      && < 1.2-                     , QuickCheck            >= 2.12   && < 2.13+                     , old-time              >= 1.1    && < 1.2+                     , pretty                >= 1.1.1  && < 1.2+                     , QuickCheck            >= 2.12   && < 2.14                      , quickcheck-instances  >= 0.3.19 && < 0.4                      , random                >= 1.0.1  && < 1.2                      , tagged                >= 0.4.4  && < 1+                     , text-short            >= 0.1    && < 0.2                      , text-show             >= 3.4    && < 4                      , text-show-instances                      , th-orphans            >= 0.13.3 && < 1@@ -275,19 +281,19 @@   build-tool-depends:  hspec-discover:hspec-discover    if flag(base-4-9)-    build-depends:     base                  >= 4.9 && < 4.13+    build-depends:     base                  >= 4.9 && < 4.14     cpp-options:       "-DNEW_FUNCTOR_CLASSES"   else-    build-depends:     base                  >= 4.5 && < 4.9+    build-depends:     base                  >= 4.7 && < 4.9    if flag(template-haskell-2-11)-    build-depends:     template-haskell      >= 2.11 && < 2.15-                     , ghc-boot-th           >= 8.0  && < 8.7+    build-depends:     template-haskell      >= 2.11 && < 2.16+                     , ghc-boot-th           >= 8.0  && < 8.9   else-    build-depends:     template-haskell      >= 2.7  && < 2.11+    build-depends:     template-haskell      >= 2.9  && < 2.11    if flag(new-functor-classes)-    build-depends:     transformers          (>= 0.2.1 && < 0.4) || (>= 0.5 && < 0.6)+    build-depends:     transformers          (>= 0.3 && < 0.4) || (>= 0.5 && < 0.6)                      , transformers-compat   >= 0.5 && < 1     cpp-options:       "-DNEW_FUNCTOR_CLASSES"   else@@ -300,5 +306,5 @@   if os(windows)     build-depends:     Win32                 >= 2.1    && < 2.9   else-    build-depends:     terminfo              >= 0.3.2  && < 0.5-                     , unix                  >= 2      && < 2.8+    build-depends:     terminfo              >= 0.4    && < 0.5+                     , unix                  >= 2.7    && < 2.8