packages feed

text-show 3.11.3 → 3.11.4

raw patch · 5 files changed

+31/−21 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+### 3.11.4 [2026.06.19]+* Make the test suite report source locations for test failures accurately.+ ### 3.11.3 [2026.01.08] * Make the test suite pass with `base-4.22.*` (GHC 9.14). * Support building the test suite with `QuickCheck-2.17.*`.
README.md view
@@ -1,10 +1,8 @@ # `text-show` [![Hackage](https://img.shields.io/hackage/v/text-show.svg)][Hackage: text-show]-[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/text-show.svg)](http://packdeps.haskellers.com/reverse/text-show) [![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/workflows/Haskell-CI/badge.svg)](https://github.com/RyanGlScott/text-show/actions?query=workflow%3AHaskell-CI)-[![Windows build](https://ci.appveyor.com/api/projects/status/fy1q86lbfttmnthy?svg=true)](https://ci.appveyor.com/project/RyanGlScott/text-show)+[![Build Status](https://github.com/RyanGlScott/text-show/workflows/Haskell-CI/badge.svg)](https://github.com/RyanGlScott/text-show/actions?query=workflow%3AHaskell-CI)  [Hackage: text-show]:   http://hackage.haskell.org/package/text-show
tests/Spec/Data/TupleSpec.hs view
@@ -13,7 +13,7 @@ module Spec.Data.TupleSpec (main, spec) where  import Data.Proxy (Proxy(..))-#if MIN_VERSION_ghc_prim(0,7,0)+#if MIN_VERSION_ghc_prim(0,7,0) && MIN_VERSION_base(4,16,0) import GHC.Tuple (Solo) #endif import Instances.Data.Tuple ()@@ -84,7 +84,7 @@         matchesTextShowSpec (Proxy :: Proxy (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int))     describe "(Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int)" $ do         matchesTextShowSpec (Proxy :: Proxy (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int))-#if MIN_VERSION_ghc_prim(0,7,0)+#if MIN_VERSION_ghc_prim(0,7,0) && MIN_VERSION_base(4,16,0)     describe "Solo Int" $ do         let p :: Proxy (Solo Int)             p = Proxy
tests/Spec/Utils.hs view
@@ -35,6 +35,7 @@ import Data.Proxy (Proxy(..))  import GHC.Generics+import GHC.Stack (HasCallStack)  import Test.Hspec (Expectation, Spec, shouldBe) import Test.Hspec.QuickCheck (prop)@@ -51,64 +52,72 @@  -- | 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 "")  -- | Expect a type's 'TextShow' instance to coincide with the output produced -- by the equivalent 'Generic' functions.-genericTextShowSpec :: forall a. (Arbitrary a, Show a, TextShow a,-                                  Generic a, GTextShowB (Rep a ()))+genericTextShowSpec :: forall a.+                       (HasCallStack,+                        Arbitrary a, Show a, TextShow a,+                        Generic a, GTextShowB (Rep a ()))                     => Proxy a -> Spec 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 (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.cabal view
@@ -1,5 +1,5 @@ name:                text-show-version:             3.11.3+version:             3.11.4 synopsis:            Efficient conversion of values into Text description:         @text-show@ offers a replacement for the @Show@ typeclass intended                      for use with @Text@ instead of @String@s. This package was created@@ -152,7 +152,7 @@                        TextShow.Utils   build-depends:       array                 >= 0.3      && < 0.6                      , base                  >= 4.9      && < 4.23-                     , base-compat-batteries >= 0.11     && < 0.15+                     , base-compat-batteries >= 0.11     && < 0.16                      , bifunctors            >= 5.1      && < 6                      , bytestring            >= 0.10.8.1 && < 0.13                      , containers            >= 0.1      && < 0.9@@ -302,14 +302,14 @@                        TextShow.TH.Names   build-depends:       array                 >= 0.3      && < 0.6                      , base                  >= 4.9      && < 4.23-                     , base-compat-batteries >= 0.11     && < 0.15+                     , base-compat-batteries >= 0.11     && < 0.16                      , base-orphans          >= 0.8.5    && < 0.10                      , bytestring            >= 0.10.8.1 && < 0.13                      , deriving-compat       >= 0.6.5    && < 1                      , generic-deriving      >= 1.14.1   && < 2                      , ghc-prim                      , hspec                 >= 2        && < 3-                     , QuickCheck            >= 2.14.3   && < 2.18+                     , QuickCheck            >= 2.14.3   && < 2.19                      , quickcheck-instances  >= 0.3.28   && < 0.5                      , template-haskell      >= 2.11     && < 2.25                      , text                  >= 1.1      && < 2.2