text-show-instances 3.6 → 3.6.1
raw patch · 8 files changed
+22/−137 lines, 8 filesdep ~QuickCheckdep ~basedep ~quickcheck-instancesPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: QuickCheck, base, quickcheck-instances, template-haskell
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−2
- src/TextShow/Language/Haskell/TH.hs +0/−7
- tests/Instances/Data/Tagged.hs +0/−19
- tests/Instances/Language/Haskell/TH.hs +0/−50
- tests/Instances/Miscellaneous.hs +9/−46
- tests/Spec/Data/TaggedSpec.hs +1/−2
- tests/Spec/Language/Haskell/THSpec.hs +0/−4
- text-show-instances.cabal +6/−7
CHANGELOG.md view
@@ -1,4 +1,8 @@-### 3.6 [2017.04.22]+### 3.6.1 [2017.06.04]+* Drop support for GHC 7.0 and 7.2+* Allow building with `quickcheck-instances-0.3.14`++## 3.6 [2017.04.22] * New `TextShow` instances: * `directory`: `XdgDirectory` (from `System.Directory`) * `ghc-boot-th`: `ForeignSrcLang` (from `GHC.ForeignSrcLang.Type`)@@ -8,7 +12,7 @@ * Made the instances in `TextShow.Data.Bifunctor` poly-kinded when possible * Fix testsuite compilation on older GHCs -### 3.5 [2017.01.07]+## 3.5 [2017.01.07] * Add `TextShow(1)` instances for `Data.Graph.SCC` * `TextShow.Instances` no longer reexports the entirety of `TextShow`. Doing so meant that `text-show-instances` would be burdened with bumping its major version number every time that `text-show` made an API change in `TextShow` in order to follow the PVP. * Remove `TextShow.GHC.PackageDb` module
src/TextShow/Language/Haskell/TH.hs view
@@ -163,13 +163,6 @@ instance TextShow Doc where showb = renderB . to_HPJ_Doc -#if MIN_VERSION_template_haskell(2,5,0) && !(MIN_VERSION_template_haskell(2,7,0))--- | Only available with @template-haskell-2.5@.------ /Since: 2/-$(deriveTextShow ''ClassInstance)-#endif- #if MIN_VERSION_template_haskell(2,8,0) -- | Only available with @template-haskell-2.8.0.0@ or later. --
− tests/Instances/Data/Tagged.hs
@@ -1,19 +0,0 @@-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# OPTIONS_GHC -fno-warn-orphans #-}-{-|-Module: Instances.Data.Tagged-Copyright: (C) 2014-2017 Ryan Scott-License: BSD-style (see the file LICENSE)-Maintainer: Ryan Scott-Stability: Provisional-Portability: GHC--Provides an 'Arbitrary' instance for 'Tagged' values.--}-module Instances.Data.Tagged () where--import Data.Tagged (Tagged(..))-import Test.QuickCheck (Arbitrary)--deriving instance Arbitrary b => Arbitrary (Tagged s b)
tests/Instances/Language/Haskell/TH.hs view
@@ -194,13 +194,9 @@ , SigE fExp <$> arbitrary , RecConE <$> arbitrary <@> [fFieldExp] , pure $ RecUpdE fExp [fFieldExp]-#if MIN_VERSION_template_haskell(2,6,0) , pure $ UnboxedTupE [fExp]-#endif-#if MIN_VERSION_template_haskell(2,7,0) , pure $ UInfixE fExp fExp fExp , pure $ ParensE fExp-#endif #if MIN_VERSION_template_haskell(2,8,0) , pure $ LamCaseE [fMatch] , pure $ MultiIfE [(fGuard, fExp)]@@ -233,13 +229,9 @@ -- , SigE <$> arbitrary <*> arbitrary -- , RecConE <$> arbitrary <*> arbitrary -- , RecUpdE <$> arbitrary <*> arbitrary--- #if MIN_VERSION_template_haskell(2,6,0) -- , UnboxedTupE <$> arbitrary--- #endif--- #if MIN_VERSION_template_haskell(2,7,0) -- , UInfixE <$> arbitrary <*> arbitrary <*> arbitrary -- , ParensE <$> arbitrary--- #endif -- #if MIN_VERSION_template_haskell(2,8,0) -- , LamCaseE <$> arbitrary -- , MultiIfE <$> arbitrary@@ -276,13 +268,7 @@ instance Arbitrary Info where arbitrary = oneof [-#if MIN_VERSION_template_haskell(2,7,0) pure $ ClassI fDec [fDec]-#elif MIN_VERSION_template_haskell(2,5,0)- pure $ ClassI fDec [fClassInstance]-#else- pure $ ClassI fDec-#endif , ClassOpI <$> arbitrary <*> arbitrary <*> arbitrary@@ -304,28 +290,20 @@ <*> arbitrary #endif , TyVarI <$> arbitrary <*> arbitrary-#if MIN_VERSION_template_haskell(2,7,0) , pure $ FamilyI fDec [fDec]-#endif #if MIN_VERSION_template_haskell(2,12,0) , PatSynI <$> arbitrary <*> arbitrary #endif ] -- arbitrary = oneof [--- #if MIN_VERSION_template_haskell(2,5,0) -- ClassI <$> arbitrary <*> arbitrary--- #else--- ClassI <$> arbitrary--- #endif -- , ClassOpI <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary -- , TyConI <$> arbitrary -- , PrimTyConI <$> arbitrary <*> arbitrary <*> arbitrary -- , DataConI <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary -- , VarI <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary -- , TyVarI <$> arbitrary <*> arbitrary--- #if MIN_VERSION_template_haskell(2,7,0) -- , FamilyI <$> arbitrary <*> arbitrary--- #endif -- ] instance Arbitrary Lit where@@ -368,16 +346,10 @@ , RecP <$> arbitrary <@> [fFieldPat] , pure $ ListP [fPat] , SigP fPat <$> arbitrary-#if MIN_VERSION_template_haskell(2,5,0) , pure $ ViewP fExp fPat-#endif-#if MIN_VERSION_template_haskell(2,6,0) , pure $ UnboxedTupP [fPat]-#endif-#if MIN_VERSION_template_haskell(2,7,0) , UInfixP fPat <$> arbitrary <@> fPat , pure $ ParensP fPat-#endif #if MIN_VERSION_template_haskell(2,12,0) , UnboxedSumP fPat <$> arbitrary <*> arbitrary #endif@@ -394,16 +366,10 @@ -- , RecP <$> arbitrary <*> arbitrary -- , ListP <$> arbitrary -- , SigP <$> arbitrary <*> arbitrary--- #if MIN_VERSION_template_haskell(2,5,0) -- , ViewP <$> arbitrary <*> arbitrary--- #endif--- #if MIN_VERSION_template_haskell(2,6,0) -- , UnboxedTupP <$> arbitrary--- #endif--- #if MIN_VERSION_template_haskell(2,7,0) -- , UInfixP <$> arbitrary <*> arbitrary <*> arbitrary -- , ParensP <$> arbitrary--- #endif -- ] instance Arbitrary Pragma where@@ -447,9 +413,7 @@ , pure ListT , pure $ AppT fType fType , pure $ SigT fType fKind-#if MIN_VERSION_template_haskell(2,6,0) , UnboxedTupleT <$> arbitrary-#endif #if MIN_VERSION_template_haskell(2,8,0) , PromotedT <$> arbitrary , PromotedTupleT <$> arbitrary@@ -480,10 +444,7 @@ -- , pure ListT -- , AppT <$> arbitrary <*> arbitrary -- , SigT <$> arbitrary <*> arbitrary--- #if MIN_VERSION_template_haskell(2,6,0) -- , UnboxedTupleT <$> arbitrary--- #endif--- #if MIN_VERSION_template_haskell(2,7,0) -- , PromotedT <$> arbitrary -- , PromotedTupleT <$> arbitrary -- , pure PromotedNilT@@ -491,7 +452,6 @@ -- , pure StarT -- , pure ConstraintT -- , LitT <$> arbitrary--- #endif -- #if MIN_VERSION_template_haskell(2,10,0) -- , pure EqualityT -- #endif@@ -501,11 +461,6 @@ arbitrary = oneof [PlainTV <$> arbitrary, KindedTV <$> arbitrary <@> fKind] -- arbitrary = oneof [PlainTV <$> arbitrary, KindedTV <$> arbitrary <*> arbitrary] -#if MIN_VERSION_template_haskell(2,5,0) && !(MIN_VERSION_template_haskell(2,7,0))-instance Arbitrary ClassInstance where- arbitrary = genericArbitrary-#endif- #if MIN_VERSION_template_haskell(2,8,0) deriving instance Bounded Inline deriving instance Enum Inline@@ -643,11 +598,6 @@ fBody :: Body fBody = GuardedB []--#if MIN_VERSION_template_haskell(2,5,0) && !MIN_VERSION_template_haskell(2,7,0)-fClassInstance :: ClassInstance-fClassInstance = ClassInstance fName [fTyVarBndr] [fPred] fName [fType]-#endif fClause :: Clause fClause = Clause [] fBody []
tests/Instances/Miscellaneous.hs view
@@ -16,6 +16,7 @@ #include "HsBaseConfig.h" +import Foreign.C.Types (CInt(..), CUIntPtr(..)) import Foreign.Ptr (Ptr, nullPtr, plusPtr) import Generics.Deriving.Instances ()@@ -27,32 +28,16 @@ import System.Exit (ExitCode(..)) import System.IO (Handle, stdin, stdout, stderr)--import Test.QuickCheck (Arbitrary(..), oneof)--#if MIN_VERSION_base(4,5,0)--import Foreign.C.Types (CInt(..), CUIntPtr(..))-# if defined(HTYPE_GID_T)+#if defined(HTYPE_GID_T) import System.Posix.Types (CGid(..))-# endif-# if defined(HTYPE_UID_T)+#endif+#if defined(HTYPE_UID_T) import System.Posix.Types (CUid(..))-# endif+#endif -#else+import Test.QuickCheck (Arbitrary(..), oneof) -import Foreign.C.Types (CInt, CUIntPtr)-# if defined(HTYPE_GID_T)-import System.Posix.Types (CGid)-# endif-# if defined(HTYPE_UID_T)-import System.Posix.Types (CUid)-# endif-import Test.QuickCheck (arbitrarySizedBoundedIntegral) -#endif- instance Arbitrary ExitCode where arbitrary = genericArbitrary @@ -62,35 +47,13 @@ instance Arbitrary (Ptr a) where arbitrary = plusPtr nullPtr <$> arbitrary -#if MIN_VERSION_base(4,5,0)- deriving instance Arbitrary CInt deriving instance Arbitrary CUIntPtr -# if defined(HTYPE_GID_T)+#if defined(HTYPE_GID_T) deriving instance Arbitrary CGid-# endif+#endif -# if defined(HTYPE_UID_T)+#if defined(HTYPE_UID_T) deriving instance Arbitrary CUid-# endif--#else--instance Arbitrary CInt where- arbitrary = arbitrarySizedBoundedIntegral--instance Arbitrary CUIntPtr where- arbitrary = arbitrarySizedBoundedIntegral--# if defined(HTYPE_GID_T)-instance Arbitrary CGid where- arbitrary = arbitrarySizedBoundedIntegral-# endif--# if defined(HTYPE_UID_T)-instance Arbitrary CUid where- arbitrary = arbitrarySizedBoundedIntegral-# endif- #endif
tests/Spec/Data/TaggedSpec.hs view
@@ -13,11 +13,10 @@ import Data.Proxy (Proxy(..)) import Data.Tagged (Tagged) -import Instances.Data.Tagged ()- import Spec.Utils (matchesTextShowSpec) import Test.Hspec (Spec, describe, hspec, parallel)+import Test.QuickCheck.Instances () import TextShow.Data.Tagged ()
tests/Spec/Language/Haskell/THSpec.hs view
@@ -45,10 +45,6 @@ matchesTextShowSpec (Proxy :: Proxy Body) describe "Callconv" $ matchesTextShowSpec (Proxy :: Proxy Callconv)-#if MIN_VERSION_template_haskell(2,5,0) && !(MIN_VERSION_template_haskell(2,7,0))- describe "ClassInstance" $- matchesTextShowSpec (Proxy :: Proxy ClassInstance)-#endif describe "Clause" $ matchesTextShowSpec (Proxy :: Proxy Clause) describe "Con" $
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name: text-show-instances-version: 3.6+version: 3.6.1 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@@ -166,13 +166,13 @@ build-depends: base >= 4.9 && < 5 cpp-options: "-DNEW_FUNCTOR_CLASSES" else- build-depends: base >= 4.3 && < 4.9+ build-depends: base >= 4.5 && < 4.9 if flag(template-haskell-2-11) build-depends: template-haskell >= 2.11 && < 2.13 , ghc-boot-th >= 8.0 && < 8.3 else- build-depends: template-haskell >= 2.5 && < 2.11+ build-depends: template-haskell >= 2.7 && < 2.11 if flag(new-functor-classes) build-depends: transformers (>= 0.2.1 && < 0.4) || (>= 0.5 && < 0.6)@@ -197,7 +197,6 @@ Instances.Data.Binary Instances.Data.Containers Instances.Data.Functor.Trans- Instances.Data.Tagged Instances.Language.Haskell.TH Instances.Miscellaneous Instances.System.Console.Haskeline@@ -276,7 +275,7 @@ , pretty >= 1 && < 1.2 , process >= 1 && < 1.7 , QuickCheck >= 2.9 && < 3- , quickcheck-instances >= 0.3.12 && < 0.4+ , quickcheck-instances >= 0.3.14 && < 0.4 , random >= 1.0.1 && < 1.2 , semigroups >= 0.17 && < 1 , tagged >= 0.4.4 && < 1@@ -292,13 +291,13 @@ build-depends: base >= 4.9 && < 5 cpp-options: "-DNEW_FUNCTOR_CLASSES" else- build-depends: base >= 4.3 && < 4.9+ build-depends: base >= 4.5 && < 4.9 if flag(template-haskell-2-11) build-depends: template-haskell >= 2.11 && < 2.13 , ghc-boot-th >= 8.0 && < 8.3 else- build-depends: template-haskell >= 2.5 && < 2.11+ build-depends: template-haskell >= 2.7 && < 2.11 if flag(new-functor-classes) build-depends: transformers (>= 0.2.1 && < 0.4) || (>= 0.5 && < 0.6)