packages feed

text-show-instances 3.9.10 → 3.9.11

raw patch · 4 files changed

+40/−31 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ TextShow.Language.Haskell.TH: instance TextShow.Classes.TextShow Language.Haskell.TH.Syntax.BndrVis
- TextShow.Instances: class () => TextShow a
+ TextShow.Instances: class TextShow a

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+### 3.9.11 [2026.06.19]+* Make the test suite report source locations for test failures accurately.+ ### 3.9.10 [2024.11.05] * Support building with `quickcheck-instances-0.3.32` or later in the test   suite.
README.md view
@@ -1,10 +1,8 @@ # `text-show-instances` [![Hackage](https://img.shields.io/hackage/v/text-show-instances.svg)][Hackage: text-show-instances]-[![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://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)+[![Build Status](https://github.com/RyanGlScott/text-show-instances/workflows/Haskell-CI/badge.svg)](https://github.com/RyanGlScott/text-show-instances/actions?query=workflow%3AHaskell-CI)  [Hackage: text-show-instances]:   http://hackage.haskell.org/package/text-show-instances
tests/Spec/Utils.hs view
@@ -24,6 +24,8 @@  import Generics.Deriving.Base +import GHC.Stack (HasCallStack)+ import Test.Hspec (Expectation, Spec, shouldBe) import Test.Hspec.QuickCheck (prop) import Test.QuickCheck (Arbitrary)@@ -34,38 +36,41 @@  -- | 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)+matchesTextShowSpec :: forall a. (HasCallStack, Arbitrary a, Show a, TextShow a)                     => Proxy a -> Spec 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 -> Expectation+prop_matchesTextShow :: (HasCallStack, Show a, TextShow a)+                     => Int -> a -> Expectation 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. matchesTextShow1Spec :: forall f a.-                        (Arbitrary (f a), Show1 f, Show a, Show (f a), TextShow1 f, TextShow a)+                        (HasCallStack, 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 -> 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 -> Expectation+prop_matchesTextShow1 :: (HasCallStack, Show1 f, Show a, TextShow1 f, TextShow a)+                      => Int -> f a -> Expectation prop_matchesTextShow1 p x = showbPrec1 p x `shouldBe` fromString (showsPrec1 p x "")  -- | Expect a type's 'Show2' instances to coincide for both 'String's and 'Text', -- irrespective of precedence. matchesTextShow2Spec :: forall f a b.-                        (Arbitrary (f a b), Show2 f, Show a, Show b, Show (f a b),+                        (HasCallStack,+                         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 -> 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)+prop_matchesTextShow2 :: (HasCallStack, Show2 f, Show a, Show b, TextShow2 f, TextShow a, TextShow b)                       => Int -> f a b -> Expectation prop_matchesTextShow2 p x = showbPrec2 p x `shouldBe` fromString (showsPrec2 p x "") @@ -78,20 +83,23 @@  -- | Verifies that a type's 'TextShow' instance coincides with the output produced -- by the equivalent 'Generic' functions.-prop_genericTextShow :: (TextShow a, Generic a, GTextShowB (Rep a ()))+prop_genericTextShow :: (HasCallStack, TextShow a, Generic a, GTextShowB (Rep a ()))                      => 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, GTextShowB1 (Rep1 f), TextShow a)+genericTextShow1Spec :: forall f a.+                        (HasCallStack,+                         Arbitrary (f a), Show (f a), TextShow1 f,+                         Generic1 f, GTextShowB1 (Rep1 f), TextShow a)                      => Proxy (f a) -> Spec 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+prop_genericTextShow1 :: ( HasCallStack+                         , TextShow1 f, Generic1 f                          , GTextShowB1 (Rep1 f), TextShow a                          )                       => Int -> f a -> Expectation
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name:                text-show-instances-version:             3.9.10+version:             3.9.11 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@@ -82,7 +82,7 @@                    , GHC == 9.2.8                    , GHC == 9.4.8                    , GHC == 9.6.6-                   , GHC == 9.8.2+                   , GHC == 9.8.4                    , GHC == 9.10.1                    , GHC == 9.12.1 extra-source-files:  CHANGELOG.md, README.md@@ -129,29 +129,29 @@                        TextShow.System.Console.Terminfo                        TextShow.System.Posix   other-modules:       TextShow.Utils-  build-depends:       aeson                 >= 2.0.3    && < 2.3-                     , base                  >= 4.10     && < 4.22+  build-depends:       aeson                 >= 2.0.3    && < 2.4+                     , base                  >= 4.10     && < 4.23                      , base-compat           >= 0.10     && < 1                      , bifunctors            >= 5.2      && < 6                      , binary                >= 0.8.3    && < 0.9-                     , containers            >= 0.5.10.2 && < 0.8+                     , containers            >= 0.5.10.2 && < 0.9                      , directory             >= 1.3      && < 1.4-                     , ghc-boot-th           >= 8.2      && < 9.13+                     , ghc-boot-th           >= 8.2      && < 9.15                      , haskeline             >= 0.7.3    && < 0.9                      , hpc                   >= 0.6      && < 0.8                      , nonempty-vector       >= 0.2      && < 0.3                      , old-locale            >= 1        && < 1.1                      , old-time              >= 1.1      && < 1.2                      , pretty                >= 1.1.3.3  && < 1.2-                     , random                >= 1.0.1    && < 1.3+                     , random                >= 1.0.1    && < 1.4                      , scientific            >= 0.3.7    && < 0.4                      , semigroups            >= 0.16.2   && < 1                      , tagged                >= 0.4.4    && < 1-                     , template-haskell      >= 2.12     && < 2.23+                     , template-haskell      >= 2.12     && < 2.25                      , text                  >= 0.11.1   && < 2.2                      , text-short            >= 0.1      && < 0.2                      , text-show             >= 3.4      && < 4-                     , time                  >= 1.8.0.2  && < 1.15+                     , time                  >= 1.8.0.2  && < 1.16                      , transformers          >= 0.5      && < 0.7                      , unordered-containers  >= 0.2      && < 0.3                      , uuid-types            >= 1        && < 1.1@@ -236,15 +236,15 @@                        -- Only defines tests if not using Windows                        Spec.System.Console.TerminfoSpec                        Spec.System.PosixSpec-  build-depends:       aeson                 >= 2.0.3    && < 2.3-                     , base                  >= 4.10     && < 4.22+  build-depends:       aeson                 >= 2.0.3    && < 2.4+                     , base                  >= 4.10     && < 4.23                      , base-compat           >= 0.10     && < 1                      , bifunctors            >= 5.5.5    && < 6                      , binary                >= 0.8.3    && < 0.9-                     , containers            >= 0.5.10.2 && < 0.8+                     , containers            >= 0.5.10.2 && < 0.9                      , directory             >= 1.3      && < 1.4                      , generic-deriving      >= 1.9      && < 2-                     , ghc-boot-th           >= 8.2      && < 9.13+                     , ghc-boot-th           >= 8.2      && < 9.15                      , ghc-prim                      , haskeline             >= 0.7.3    && < 0.9                      , hpc                   >= 0.6      && < 0.8@@ -253,17 +253,17 @@                      , old-locale            >= 1        && < 1.1                      , old-time              >= 1.1      && < 1.2                      , pretty                >= 1.1.3.3  && < 1.2-                     , QuickCheck            >= 2.12     && < 2.16-                     , quickcheck-instances  >= 0.3.27   && < 0.4-                     , random                >= 1.0.1    && < 1.3+                     , QuickCheck            >= 2.12     && < 2.19+                     , quickcheck-instances  >= 0.3.27   && < 0.5+                     , random                >= 1.0.1    && < 1.4                      , tagged                >= 0.4.4    && < 1                      , scientific            >= 0.3.7    && < 0.4-                     , template-haskell      >= 2.12     && < 2.23+                     , template-haskell      >= 2.12     && < 2.25                      , text-short            >= 0.1      && < 0.2                      , text-show             >= 3.10     && < 4                      , text-show-instances                      , th-orphans            >= 0.13.8   && < 1-                     , time                  >= 1.8.0.2  && < 1.15+                     , time                  >= 1.8.0.2  && < 1.16                      , transformers          >= 0.5      && < 0.7                      , transformers-compat   >= 0.5      && < 1                      , unordered-containers  >= 0.2      && < 0.3