text-show-instances 3.8.6 → 3.9
raw patch · 6 files changed
+39/−41 lines, 6 filesdep ~basedep ~ghc-boot-thdep ~template-haskellPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, ghc-boot-th, template-haskell, time, transformers, vector
API changes (from Hackage documentation)
- TextShow.Control.Monad.Trans: instance (TextShow.Classes.TextShow e, TextShow.Classes.TextShow1 m) => TextShow.Classes.TextShow1 (Control.Monad.Trans.Error.ErrorT e m)
- TextShow.Control.Monad.Trans: instance (TextShow.Classes.TextShow e, TextShow.Classes.TextShow1 m, TextShow.Classes.TextShow a) => TextShow.Classes.TextShow (Control.Monad.Trans.Error.ErrorT e m a)
- TextShow.Control.Monad.Trans: instance (TextShow.Classes.TextShow1 m, TextShow.Classes.TextShow a) => TextShow.Classes.TextShow (Control.Monad.Trans.List.ListT m a)
- TextShow.Control.Monad.Trans: instance TextShow.Classes.TextShow1 m => TextShow.Classes.TextShow1 (Control.Monad.Trans.List.ListT m)
Files
- CHANGELOG.md +4/−0
- src/TextShow/Control/Monad/Trans.hs +1/−23
- src/TextShow/Data/Binary.hs +23/−0
- tests/Instances/Control/Monad/Trans.hs +0/−5
- tests/Spec/Control/Monad/TransSpec.hs +0/−7
- text-show-instances.cabal +11/−6
CHANGELOG.md view
@@ -1,3 +1,7 @@+## 3.9 [2022.05.28]+* Remove instances for `ErrorT` and `ListT`, which had long been deprecated and+ were finally removed from the `transformers` library in version 0.6.0.0.+ ### 3.8.6 [2021.11.21] * Add a `TextShow` instance for `Scientific` from the `scientific` package. * Require `quickcheck-instances-0.3.27` or later in the test suite.
src/TextShow/Control/Monad/Trans.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-warnings-deprecations #-}+{-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module: TextShow.Control.Monad.Trans Copyright: (C) 2014-2017 Ryan Scott@@ -14,10 +14,8 @@ -} module TextShow.Control.Monad.Trans () where -import Control.Monad.Trans.Error (ErrorT(..)) import Control.Monad.Trans.Except (ExceptT(..)) import Control.Monad.Trans.Identity (IdentityT(..))-import Control.Monad.Trans.List (ListT(..)) import Control.Monad.Trans.Maybe (MaybeT(..)) import qualified Control.Monad.Trans.Writer.Lazy as WL (WriterT(..)) import qualified Control.Monad.Trans.Writer.Strict as WS (WriterT(..))@@ -44,16 +42,6 @@ {-# INLINE liftShowbWriterTPrec #-} -- | /Since: 2/-instance (TextShow e, TextShow1 m, TextShow a) => TextShow (ErrorT e m a) where- showbPrec = showbPrec1- {-# INLINE showbPrec #-}---- | /Since: 2/-instance (TextShow e, TextShow1 m) => TextShow1 (ErrorT e m) where- liftShowbPrec sp sl p (ErrorT m) = liftMShowbUnaryWith sp sl "ErrorT" p m- {-# INLINE liftShowbPrec #-}---- | /Since: 2/ instance (TextShow e, TextShow1 m, TextShow a) => TextShow (ExceptT e m a) where showbPrec = showbPrec1 {-# INLINE showbPrec #-}@@ -71,16 +59,6 @@ -- | /Since: 2/ instance TextShow1 f => TextShow1 (IdentityT f) where liftShowbPrec sp sl p (IdentityT m) = liftShowbUnaryWith sp sl "IdentityT" p m- {-# INLINE liftShowbPrec #-}---- | /Since: 2/-instance (TextShow1 m, TextShow a) => TextShow (ListT m a) where- showbPrec = showbPrec1- {-# INLINE showbPrec #-}---- | /Since: 2/-instance TextShow1 m => TextShow1 (ListT m) where- liftShowbPrec sp sl p (ListT m) = liftMShowbUnaryWith sp sl "ListT" p m {-# INLINE liftShowbPrec #-} -- | /Since: 2/
src/TextShow/Data/Binary.hs view
@@ -1,5 +1,10 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-}+#if __GLASGOW_HASKELL__ == 800+-- See Note [Increased simpl-tick-factor on old GHCs]+{-# OPTIONS_GHC -fsimpl-tick-factor=200 #-}+#endif {-| Module: TextShow.Data.Binary@@ -37,3 +42,21 @@ go sp (Done _ a) = "Done: " <> sp a go _ (BytesRead _ _) = "BytesRead" {-# INLINE liftShowbPrec #-}++{-+Note [Increased simpl-tick-factor on old GHCs]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Compiling certain text-show modules with optimizations on old versions of GHC+(particularly 8.0 and 8.2) will trigger "Simplifier ticks exhausted" panics.+To make things worse, this sometimes depends on whether a certain version of+the text library is being used. There are two possible ways to work around+this issue:++1. Figure out which uses of the INLINE pragma in text-show are responsible+ and remove them.+2. Just increase the tick limit.++Since executing on (1) will require a lot of effort to fix an issue that only+happens on old versions of GHC, I've opted for the simple solution of (2) for+now. Issue #51 is a reminder to revisit this choice.+-}
tests/Instances/Control/Monad/Trans.hs view
@@ -3,7 +3,6 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-}-{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} {-| Module: Instances.Control.Monad.Trans Copyright: (C) 2014-2017 Ryan Scott@@ -16,18 +15,14 @@ -} module Instances.Control.Monad.Trans () where -import Control.Monad.Trans.Error (ErrorT(..)) import Control.Monad.Trans.Except (ExceptT(..)) import Control.Monad.Trans.Identity (IdentityT(..))-import Control.Monad.Trans.List (ListT(..)) import qualified Control.Monad.Trans.Writer.Lazy as WL (WriterT(..)) import qualified Control.Monad.Trans.Writer.Strict as WS (WriterT(..)) import Test.QuickCheck (Arbitrary) -deriving instance Arbitrary (m (Either e a)) => Arbitrary (ErrorT e m a) deriving instance Arbitrary (m (Either e a)) => Arbitrary (ExceptT e m a) deriving instance Arbitrary (f a) => Arbitrary (IdentityT f a)-deriving instance Arbitrary (m [a]) => Arbitrary (ListT m a) deriving instance Arbitrary (m (a, w)) => Arbitrary (WL.WriterT w m a) deriving instance Arbitrary (m (a, w)) => Arbitrary (WS.WriterT w m a)
tests/Spec/Control/Monad/TransSpec.hs view
@@ -1,4 +1,3 @@-{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} {-| Module: Spec.Control.Monad.TransSpec Copyright: (C) 2014-2017 Ryan Scott@@ -11,10 +10,8 @@ -} module Spec.Control.Monad.TransSpec (main, spec) where -import Control.Monad.Trans.Error (ErrorT) import Control.Monad.Trans.Except (ExceptT) import Control.Monad.Trans.Identity (IdentityT)-import Control.Monad.Trans.List (ListT) import Control.Monad.Trans.Maybe (MaybeT) import qualified Control.Monad.Trans.Writer.Lazy as WL (WriterT) import qualified Control.Monad.Trans.Writer.Strict as WS (WriterT)@@ -35,14 +32,10 @@ spec :: Spec spec = parallel $ do- describe "ErrorT Char Maybe Int" $- matchesTextShowSpec (Proxy :: Proxy (ErrorT Char Maybe Int)) describe "ExceptT Char Maybe Int" $ matchesTextShowSpec (Proxy :: Proxy (ExceptT Char Maybe Int)) describe "IdentityT Maybe Int" $ matchesTextShowSpec (Proxy :: Proxy (IdentityT Maybe Int))- describe "ListT Maybe Char" $- matchesTextShowSpec (Proxy :: Proxy (ListT Maybe Char)) describe "Maybe [] Int" $ matchesTextShowSpec (Proxy :: Proxy (MaybeT [] Int)) describe "lazy WriterT String Maybe Int" $
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name: text-show-instances-version: 3.8.6+version: 3.9 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@@ -74,8 +74,9 @@ , GHC == 8.4.4 , GHC == 8.6.5 , GHC == 8.8.4- , GHC == 8.10.4- , GHC == 9.0.1+ , GHC == 8.10.7+ , GHC == 9.0.2+ , GHC == 9.2.2 extra-source-files: CHANGELOG.md, README.md cabal-version: >=1.10 @@ -150,7 +151,7 @@ , scientific >= 0.3.7 && < 0.4 , semigroups >= 0.16.2 && < 1 , tagged >= 0.4.4 && < 1- , text >= 0.11.1 && < 1.3+ , text >= 0.11.1 && < 2.1 , text-short >= 0.1 && < 0.2 , text-show >= 3.4 && < 4 , time >= 0.1 && < 1.12@@ -160,6 +161,8 @@ hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall+ if impl(ghc >= 9.0)+ ghc-options: -fenable-th-splice-warnings if flag(base-4-9) build-depends: base >= 4.9 && < 4.17@@ -174,7 +177,7 @@ build-depends: template-haskell >= 2.9 && < 2.11 if flag(new-functor-classes)- build-depends: transformers (>= 0.3 && < 0.4) || (>= 0.5 && < 0.6)+ build-depends: transformers (>= 0.3 && < 0.4) || (>= 0.5 && < 0.7) , transformers-compat >= 0.5 && < 1 cpp-options: "-DNEW_FUNCTOR_CLASSES" else@@ -299,7 +302,7 @@ build-depends: template-haskell >= 2.9 && < 2.11 if flag(new-functor-classes)- build-depends: transformers (>= 0.3 && < 0.4) || (>= 0.5 && < 0.6)+ build-depends: transformers (>= 0.3 && < 0.4) || (>= 0.5 && < 0.7) cpp-options: "-DNEW_FUNCTOR_CLASSES" else build-depends: transformers == 0.4.*@@ -309,6 +312,8 @@ ghc-options: -Wall -threaded -rtsopts if impl(ghc >= 8.6) ghc-options: -Wno-star-is-type+ if impl(ghc >= 9.0)+ ghc-options: -fenable-th-splice-warnings if os(windows) build-depends: Win32 >= 2.1 && < 2.13