packages feed

text-show-instances 3.8.4 → 3.8.5

raw patch · 9 files changed

+55/−75 lines, 9 filesdep ~Win32dep ~basedep ~ghc-boot-thPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: Win32, base, ghc-boot-th, quickcheck-instances, template-haskell, time

API changes (from Hackage documentation)

- TextShow.Data.Bifunctor: instance forall k (g :: * -> *) (a :: k). TextShow.Classes.TextShow1 g => TextShow.Classes.TextShow1 (Data.Bifunctor.Joker.Joker g a)
- TextShow.Data.Bifunctor: instance forall k k1 (g :: k1 -> *) (b :: k1) (a :: k). TextShow.Classes.TextShow (g b) => TextShow.Classes.TextShow (Data.Bifunctor.Joker.Joker g a b)
- TextShow.Data.Bifunctor: instance forall k1 k (f :: k -> *) (a :: k) (b :: k1). TextShow.Classes.TextShow (f a) => TextShow.Classes.TextShow (Data.Bifunctor.Clown.Clown f a b)
- TextShow.Data.Bifunctor: instance forall k1 k (p :: k1 -> k -> *) (b :: k1) (a :: k). TextShow.Classes.TextShow (p b a) => TextShow.Classes.TextShow (Data.Bifunctor.Flip.Flip p a b)
- TextShow.Data.Bifunctor: instance forall k1 k2 k (f :: k -> *) (p :: k1 -> k2 -> k) (a :: k1) (b :: k2). TextShow.Classes.TextShow (f (p a b)) => TextShow.Classes.TextShow (Data.Bifunctor.Tannen.Tannen f p a b)
- TextShow.Data.Bifunctor: instance forall k3 k2 k k1 (p :: k -> k1 -> *) (f :: k2 -> k) (a :: k2) (g :: k3 -> k1) (b :: k3). TextShow.Classes.TextShow (p (f a) (g b)) => TextShow.Classes.TextShow (Data.Bifunctor.Biff.Biff p f g a b)
+ TextShow.Data.Bifunctor: instance forall k k1 (f :: k -> *) (a :: k) (b :: k1). TextShow.Classes.TextShow (f a) => TextShow.Classes.TextShow (Data.Bifunctor.Clown.Clown f a b)
+ TextShow.Data.Bifunctor: instance forall k k1 (g :: k -> *) (b :: k) (a :: k1). TextShow.Classes.TextShow (g b) => TextShow.Classes.TextShow (Data.Bifunctor.Joker.Joker g a b)
+ TextShow.Data.Bifunctor: instance forall k k1 (p :: k -> k1 -> *) (b :: k) (a :: k1). TextShow.Classes.TextShow (p b a) => TextShow.Classes.TextShow (Data.Bifunctor.Flip.Flip p a b)
+ TextShow.Data.Bifunctor: instance forall k k1 k2 (f :: k -> *) (p :: k1 -> k2 -> k) (a :: k1) (b :: k2). TextShow.Classes.TextShow (f (p a b)) => TextShow.Classes.TextShow (Data.Bifunctor.Tannen.Tannen f p a b)
+ TextShow.Data.Bifunctor: instance forall k k1 k2 k3 (p :: k -> k1 -> *) (f :: k2 -> k) (a :: k2) (g :: k3 -> k1) (b :: k3). TextShow.Classes.TextShow (p (f a) (g b)) => TextShow.Classes.TextShow (Data.Bifunctor.Biff.Biff p f g a b)
+ TextShow.Data.Bifunctor: instance forall k1 (g :: * -> *) (a :: k1). TextShow.Classes.TextShow1 g => TextShow.Classes.TextShow1 (Data.Bifunctor.Joker.Joker g a)
+ TextShow.Language.Haskell.TH: instance TextShow.Classes.TextShow Language.Haskell.TH.Syntax.Bytes

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+### 3.8.5 [2021.10.31]+* Allow building with GHC 9.2.+* Require `quickcheck-instances-0.3.26` or later in the test suite.+ ### 3.8.4 [2020.10.03] * Allow building with `template-haskell-2.17.0.0` (GHC 9.0). 
README.md view
@@ -3,7 +3,7 @@ [![Hackage Dependencies](https://img.shields.io/hackage-deps/v/text-show-instances.svg)](http://packdeps.haskellers.com/reverse/text-show-instances) [![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)][Haskell.org] [![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)][tl;dr Legal: BSD3]-[![Linux build](https://img.shields.io/travis/RyanGlScott/text-show-instances.svg)](https://travis-ci.org/RyanGlScott/text-show-instances)+[![Linux build](https://github.com/RyanGlScott/text-show-instances/workflows/Haskell-CI/badge.svg)](https://github.com/RyanGlScott/text-show-instances/actions?query=workflow%3AHaskell-CI) [![Windows build](https://ci.appveyor.com/api/projects/status/ykkc085q8mvpij9d?svg=true)](https://ci.appveyor.com/project/RyanGlScott/text-show-instances)  [Hackage: text-show-instances]:
tests/Instances/Control/Applicative/Trans.hs view
@@ -20,11 +20,12 @@  import           Control.Applicative.Backwards (Backwards(..)) import           Control.Applicative.Lift      (Lift(..))+import           Control.Monad.Trans.Instances () -#if __GLASGOW_HASKELL__ >= 706+-- TODO: Remove the MIN_VERSION_transformers_compat(0,7,0) by unconditionally+-- depending on transformers-0.7 or later+#if !(MIN_VERSION_transformers(0,6,0)) && !(MIN_VERSION_transformers_compat(0,7,0)) import           GHC.Generics (Generic)-#else-import qualified Generics.Deriving.TH as Generics (deriveAll0) #endif  import           Instances.Utils.GenericArbitrary (genericArbitrary)@@ -36,8 +37,8 @@ instance (Arbitrary a, Arbitrary (f a)) => Arbitrary (Lift f a) where     arbitrary = genericArbitrary -#if __GLASGOW_HASKELL__ >= 706+-- TODO: Remove the MIN_VERSION_transformers_compat(0,7,0) by unconditionally+-- depending on transformers-0.7 or later+#if !(MIN_VERSION_transformers(0,6,0)) && !(MIN_VERSION_transformers_compat(0,7,0)) deriving instance Generic (Lift f a)-#else-$(Generics.deriveAll0 ''Lift) #endif
− tests/Instances/Data/ShortText.hs
@@ -1,24 +0,0 @@-{-# 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/Spec/Data/ShortTextSpec.hs view
@@ -10,16 +10,15 @@ -} module Spec.Data.ShortTextSpec (main, spec) where -import           Data.Proxy               (Proxy (..))-import           Data.Text.Short          (ShortText)--import           Instances.Data.ShortText ()+import           Data.Proxy                (Proxy (..))+import           Data.Text.Short           (ShortText) -import           Spec.Utils               (matchesTextShowSpec)+import           Spec.Utils                (matchesTextShowSpec) -import           Test.Hspec               (Spec, describe, hspec, parallel)+import           Test.Hspec                (Spec, describe, hspec, parallel)+import           Test.QuickCheck.Instances () -import           TextShow.Data.ShortText  ()+import           TextShow.Data.ShortText   ()  main :: IO () main = hspec spec
tests/Spec/Language/Haskell/THSpec.hs view
@@ -19,7 +19,7 @@  import Spec.Utils (matchesTextShowSpec) -import Test.Hspec (Spec, describe, hspec, parallel)+import Test.Hspec (Expectation, Spec, describe, hspec, parallel, shouldBe) import Test.Hspec.QuickCheck (prop)  import TextShow (fromString)@@ -48,5 +48,5 @@         matchesTextShowSpec (Proxy :: Proxy PkgName)  -- | Verifies that `showName'` and `showbName'` have the same output.-prop_showName' :: NameIs -> Name -> Bool-prop_showName' nameIs name = fromString (showName' nameIs name) == showbName' nameIs name+prop_showName' :: NameIs -> Name -> Expectation+prop_showName' nameIs name = fromString (showName' nameIs name) `shouldBe` showbName' nameIs name
tests/Spec/Text/PrettyPrintSpec.hs view
@@ -82,5 +82,5 @@ #endif  -- | Verifies that the output of 'renderStyle' and 'renderStyleB' coincides.--- prop_renderStyle :: Style -> Doc -> Bool--- prop_renderStyle sty doc = fromString (renderStyle sty doc) == renderStyleB sty doc+-- prop_renderStyle :: Style -> Doc -> Expectation+-- prop_renderStyle sty doc = fromString (renderStyle sty doc) `shouldBe` renderStyleB sty doc
tests/Spec/Utils.hs view
@@ -27,7 +27,7 @@  import Generics.Deriving.Base -import Test.Hspec (Spec)+import Test.Hspec (Expectation, Spec, shouldBe) import Test.Hspec.QuickCheck (prop) import Test.QuickCheck (Arbitrary) @@ -43,24 +43,24 @@ -- irrespective of precedence. matchesTextShowSpec :: forall a. (Arbitrary a, Show a, TextShow a)                     => Proxy a -> Spec-matchesTextShowSpec _ = prop "TextShow instance" (prop_matchesTextShow :: Int -> a -> Bool)+matchesTextShowSpec _ = prop "TextShow instance" (prop_matchesTextShow :: Int -> a -> Expectation)  -- | 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 -> Bool-prop_matchesTextShow p x = fromString (showsPrec p x "") == showbPrec p x+prop_matchesTextShow :: (Show a, TextShow a) => Int -> a -> Expectation+prop_matchesTextShow p x = fromString (showsPrec p x "") `shouldBe` showbPrec p x  -- | Expect a type's 'Show1' instances to coincide for both 'String's and 'Text', -- irrespective of precedence. matchesTextShow1Spec :: forall f a.                         (Arbitrary (f a), Show1 f, Show a, Show (f a), TextShow1 f, TextShow a)                      => Proxy (f a) -> Spec-matchesTextShow1Spec _ = prop "TextShow1 instance" (prop_matchesTextShow1 :: Int -> f a -> Bool)+matchesTextShow1Spec _ = prop "TextShow1 instance" (prop_matchesTextShow1 :: Int -> f a -> Expectation)  -- | 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 -> Bool-prop_matchesTextShow1 p x = fromString (showsPrec1 p x "") == showbPrec1 p x+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  #if defined(NEW_FUNCTOR_CLASSES) -- | Expect a type's 'Show2' instances to coincide for both 'String's and 'Text',@@ -69,13 +69,13 @@                         (Arbitrary (f a b), Show2 f, Show a, Show b, Show (f a b),                          TextShow2 f, TextShow a, TextShow b)                      => Proxy (f a b) -> Spec-matchesTextShow2Spec _ = prop "TextShow2 instance" (prop_matchesTextShow2 :: Int -> f a b -> Bool)+matchesTextShow2Spec _ = prop "TextShow2 instance" (prop_matchesTextShow2 :: Int -> f a b -> Expectation)  -- | Verifies that a type's 'Show2' instances coincide for both 'String's and 'Text', -- irrespective of precedence. prop_matchesTextShow2 :: (Show2 f, Show a, Show b, TextShow2 f, TextShow a, TextShow b)-                      => Int -> f a b -> Bool-prop_matchesTextShow2 p x = fromString (showsPrec2 p x "") == showbPrec2 p x+                      => Int -> f a b -> Expectation+prop_matchesTextShow2 p x = fromString (showsPrec2 p x "") `shouldBe` showbPrec2 p x #endif  -- | Expect a type's 'TextShow' instance to coincide with the output produced@@ -83,26 +83,26 @@ genericTextShowSpec :: forall a. (Arbitrary a, Show a, TextShow a,                                   Generic a, GTextShowB Zero (Rep a))                     => Proxy a -> Spec-genericTextShowSpec _ = prop "generic TextShow" (prop_genericTextShow  :: Int -> a -> Bool)+genericTextShowSpec _ = prop "generic TextShow" (prop_genericTextShow  :: Int -> a -> Expectation)  -- | Verifies that a type's 'TextShow' instance coincides with the output produced -- by the equivalent 'Generic' functions. prop_genericTextShow :: (TextShow a, Generic a, GTextShowB Zero (Rep a))-                     => Int -> a -> Bool-prop_genericTextShow p x = showbPrec p x == genericShowbPrec p x+                     => Int -> a -> Expectation+prop_genericTextShow p x = showbPrec p x `shouldBe` genericShowbPrec p x  -- | Expect a type's 'TextShow1' instance to coincide with the output produced -- by the equivalent 'Generic1' functions. genericTextShow1Spec :: forall f a. (Arbitrary (f a), Show (f a), TextShow1 f,                                      Generic1 f, GTextShowB One (Rep1 f), TextShow a)                      => Proxy (f a) -> Spec-genericTextShow1Spec _ = prop "generic TextShow1" (prop_genericTextShow1 :: Int -> f a -> Bool)+genericTextShow1Spec _ = prop "generic TextShow1" (prop_genericTextShow1 :: Int -> f a -> Expectation)  -- | Verifies that a type's 'TextShow1' instance coincides with the output produced -- by the equivalent 'Generic1' functions. prop_genericTextShow1 :: ( TextShow1 f, Generic1 f                          , GTextShowB One (Rep1 f), TextShow a                          )-                      => Int -> f a -> Bool+                      => Int -> f a -> Expectation prop_genericTextShow1 p x =-    showbPrec1 p x == genericLiftShowbPrec showbPrec showbList p x+    showbPrec1 p x `shouldBe` genericLiftShowbPrec showbPrec showbList p x
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name:                text-show-instances-version:             3.8.4+version:             3.8.5 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@@ -71,8 +71,9 @@                    , GHC == 8.2.2                    , GHC == 8.4.4                    , GHC == 8.6.5-                   , GHC == 8.8.3-                   , GHC == 8.10.1+                   , GHC == 8.8.4+                   , GHC == 8.10.4+                   , GHC == 9.0.1 extra-source-files:  CHANGELOG.md, README.md cabal-version:       >=1.10 @@ -148,7 +149,7 @@                      , text                  >= 0.11.1 && < 1.3                      , text-short            >= 0.1    && < 0.2                      , text-show             >= 3.4    && < 4-                     , time                  >= 0.1    && < 1.11+                     , time                  >= 0.1    && < 1.12                      , unordered-containers  >= 0.2    && < 0.3                      , vector                >= 0.12   && < 0.13                      , xhtml                 >= 3000.2 && < 3000.3@@ -157,14 +158,14 @@   ghc-options:         -Wall    if flag(base-4-9)-    build-depends:     base                  >= 4.9 && < 4.16+    build-depends:     base                  >= 4.9 && < 4.17     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.18-                     , ghc-boot-th           >= 8.0  && < 8.11+    build-depends:     template-haskell      >= 2.11 && < 2.19+                     , ghc-boot-th           >= 8.0  && < 9.3   else     build-depends:     template-haskell      >= 2.9  && < 2.11 @@ -176,7 +177,7 @@     build-depends:     transformers          == 0.4.*    if os(windows)-    build-depends:     Win32                 >= 2.1    && < 2.9+    build-depends:     Win32                 >= 2.1    && < 2.13   else     build-depends:     terminfo              >= 0.4    && < 0.5                      , unix                  >= 2.7    && < 2.8@@ -190,7 +191,6 @@                        Instances.Data.Binary                        Instances.Data.Containers                        Instances.Data.Functor.Trans-                       Instances.Data.ShortText                        Instances.Data.Vector                        Instances.Language.Haskell.TH                        Instances.Miscellaneous@@ -268,34 +268,34 @@                      , old-time              >= 1.1    && < 1.2                      , pretty                >= 1.1.1  && < 1.2                      , QuickCheck            >= 2.12   && < 2.15-                     , quickcheck-instances  >= 0.3.21 && < 0.4+                     , quickcheck-instances  >= 0.3.26 && < 0.4                      , random                >= 1.0.1  && < 1.3                      , tagged                >= 0.4.4  && < 1                      , text-short            >= 0.1    && < 0.2                      , text-show             >= 3.4    && < 4                      , text-show-instances                      , th-orphans            >= 0.13.8 && < 1-                     , time                  >= 0.1    && < 1.11+                     , time                  >= 0.1    && < 1.12+                     , transformers-compat   >= 0.5    && < 1                      , unordered-containers  >= 0.2    && < 0.3                      , vector                >= 0.9    && < 0.13                      , xhtml                 >= 3000.2 && < 3000.3   build-tool-depends:  hspec-discover:hspec-discover    if flag(base-4-9)-    build-depends:     base                  >= 4.9 && < 4.16+    build-depends:     base                  >= 4.9 && < 4.17     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.18-                     , ghc-boot-th           >= 8.0  && < 8.11+    build-depends:     template-haskell      >= 2.11 && < 2.19+                     , ghc-boot-th           >= 8.0  && < 9.3   else     build-depends:     template-haskell      >= 2.9  && < 2.11    if flag(new-functor-classes)     build-depends:     transformers          (>= 0.3 && < 0.4) || (>= 0.5 && < 0.6)-                     , transformers-compat   >= 0.5 && < 1     cpp-options:       "-DNEW_FUNCTOR_CLASSES"   else     build-depends:     transformers          == 0.4.*@@ -307,7 +307,7 @@     ghc-options:       -Wno-star-is-type    if os(windows)-    build-depends:     Win32                 >= 2.1    && < 2.9+    build-depends:     Win32                 >= 2.1    && < 2.13   else     build-depends:     terminfo              >= 0.4    && < 0.5                      , unix                  >= 2.7    && < 2.8