packages feed

text-show 3.7 → 3.7.1

raw patch · 5 files changed

+30/−7 lines, 5 filesdep ~QuickCheckdep ~base-orphansdep ~quickcheck-instances

Dependency ranges changed: QuickCheck, base-orphans, quickcheck-instances

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+### 3.7.1 [2017.12.29]+* Don't define a `TextShow GCStats` instance on GHC 8.4 or later, as `GCStats`+  has been removed from `base`. This fixes the build on GHC 8.4.+ ## 3.7 [2017.12.07] * Use `EmptyCase` on GHC 7.8 or later for `TextShow(1)` instances for empty data types that are derived using `TextShow.Generic`. * Derived `TextShow(1)(2)` instances (using `TextShow.TH`) will now force their argument instead of simply `error`ing.
src/TextShow/GHC/Stats.hs view
@@ -1,7 +1,10 @@ {-# LANGUAGE CPP             #-}++#if !(MIN_VERSION_base(4,11,0)) {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} {-# OPTIONS_GHC -fno-warn-orphans      #-}+#endif  {-| Module:      TextShow.GHC.Stats@@ -17,6 +20,7 @@ -} module TextShow.GHC.Stats () where +#if !(MIN_VERSION_base(4,11,0)) import GHC.Stats (GCStats)  import TextShow.Data.Integral ()@@ -25,3 +29,4 @@  -- /Since: 2/ $(deriveTextShow ''GCStats)+#endif
tests/Instances/GHC/Stats.hs view
@@ -1,7 +1,11 @@+{-# LANGUAGE CPP                #-}++#if !(MIN_VERSION_base(4,11,0)) {-# LANGUAGE DeriveGeneric      #-} {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} {-# OPTIONS_GHC -fno-warn-orphans      #-}+#endif  {-| Module:      Instances.GHC.Stats@@ -15,6 +19,7 @@ -} module Instances.GHC.Stats () where +#if !(MIN_VERSION_base(4,11,0)) import GHC.Generics (Generic) import GHC.Stats (GCStats(..)) @@ -25,3 +30,4 @@ deriving instance Generic GCStats instance Arbitrary GCStats where     arbitrary = genericArbitrary+#endif
tests/Spec/GHC/StatsSpec.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-deprecations #-}  {-|@@ -12,23 +13,28 @@ -} module Spec.GHC.StatsSpec (main, spec) where -import Data.Proxy (Proxy(..))--import GHC.Stats (GCStats)- import Instances.GHC.Stats ()  import Prelude () import Prelude.Compat -import Spec.Utils (matchesTextShowSpec)+import Test.Hspec (Spec, hspec, parallel) -import Test.Hspec (Spec, describe, hspec, parallel)+#if !(MIN_VERSION_base(4,11,0))+import Data.Proxy (Proxy(..))+import GHC.Stats (GCStats)+import Spec.Utils (matchesTextShowSpec)+import Test.Hspec (describe)+#endif  main :: IO () main = hspec spec  spec :: Spec spec = parallel $+#if !(MIN_VERSION_base(4,11,0))     describe "GCStats" $         matchesTextShowSpec (Proxy :: Proxy GCStats)+#else+    pure ()+#endif
text-show.cabal view
@@ -1,5 +1,5 @@ name:                text-show-version:             3.7+version:             3.7.1 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@@ -50,6 +50,7 @@                    , GHC == 7.10.3                    , GHC == 8.0.2                    , GHC == 8.2.2+                   , GHC == 8.4.1 extra-source-files:  CHANGELOG.md, README.md, include/*.h cabal-version:       >=1.10 @@ -360,6 +361,7 @@                      , th-lift              >= 0.7.6  && < 1                      , transformers-compat  >= 0.5    && < 1                      , void                 >= 0.5    && < 1+  build-tool-depends:  hspec-discover:hspec-discover    if flag(base-4-9)     build-depends:     base                >= 4.9 && < 5