text-show-instances 3.8.3 → 3.8.4
raw patch · 3 files changed
+47/−20 lines, 3 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, template-haskell
API changes (from Hackage documentation)
- TextShow.Data.UnorderedContainers: instance (TextShow.Classes.TextShow k, TextShow.Classes.TextShow v) => TextShow.Classes.TextShow (Data.HashMap.Base.HashMap k v)
- TextShow.Data.UnorderedContainers: instance TextShow.Classes.TextShow a => TextShow.Classes.TextShow (Data.HashSet.Base.HashSet a)
- TextShow.Data.UnorderedContainers: instance TextShow.Classes.TextShow k => TextShow.Classes.TextShow1 (Data.HashMap.Base.HashMap k)
- TextShow.Data.UnorderedContainers: instance TextShow.Classes.TextShow1 Data.HashSet.Base.HashSet
- TextShow.Data.UnorderedContainers: instance TextShow.Classes.TextShow2 Data.HashMap.Base.HashMap
- TextShow.System.Random: instance TextShow.Classes.TextShow System.Random.StdGen
+ TextShow.Data.UnorderedContainers: instance (TextShow.Classes.TextShow k, TextShow.Classes.TextShow v) => TextShow.Classes.TextShow (Data.HashMap.Internal.HashMap k v)
+ TextShow.Data.UnorderedContainers: instance TextShow.Classes.TextShow a => TextShow.Classes.TextShow (Data.HashSet.Internal.HashSet a)
+ TextShow.Data.UnorderedContainers: instance TextShow.Classes.TextShow k => TextShow.Classes.TextShow1 (Data.HashMap.Internal.HashMap k)
+ TextShow.Data.UnorderedContainers: instance TextShow.Classes.TextShow1 Data.HashSet.Internal.HashSet
+ TextShow.Data.UnorderedContainers: instance TextShow.Classes.TextShow2 Data.HashMap.Internal.HashMap
+ TextShow.System.Random: instance TextShow.Classes.TextShow System.Random.Internal.StdGen
Files
- CHANGELOG.md +3/−0
- src/TextShow/Language/Haskell/TH.hs +26/−5
- text-show-instances.cabal +18/−15
CHANGELOG.md view
@@ -1,3 +1,6 @@+### 3.8.4 [2020.10.03]+* Allow building with `template-haskell-2.17.0.0` (GHC 9.0).+ ### 3.8.3 [2019.11.08] * Make the `TextShow1` and `TextShow2` instances for `Fix` and `Join` in `TextShow.Data.Bifunctor` match the behavior the corresponding `Show1` and
src/TextShow/Language/Haskell/TH.hs view
@@ -26,10 +26,6 @@ import Prelude () import Prelude.Compat -#if !(MIN_VERSION_template_haskell(2,10,0))-import GHC.Exts (Int(I#))-#endif- import Language.Haskell.TH.PprLib (Doc, to_HPJ_Doc) import Language.Haskell.TH.Syntax @@ -38,6 +34,18 @@ import TextShow.Text.PrettyPrint (renderB) import TextShow.TH (deriveTextShow) +#if !(MIN_VERSION_template_haskell(2,10,0))+import GHC.Exts (Int(I#))+#endif++#if MIN_VERSION_base(4,15,0)+import qualified Data.Text.Foreign as TS (peekCStringLen)+import Foreign.ForeignPtr (withForeignPtr)+import Foreign.Ptr (plusPtr)+import System.IO.Unsafe (unsafePerformIO)+import TextShow (showtToShowb)+#endif+ -- | Convert a 'Name' to a 'Builder'. -- -- /Since: 2/@@ -107,6 +115,15 @@ instance TextShow Doc where showb = renderB . to_HPJ_Doc +#if MIN_VERSION_template_haskell(2,17,0)+instance TextShow Bytes where+ showb = showtToShowb showt+ showt b = unsafePerformIO $ withForeignPtr (bytesPtr b) $ \ptr ->+ TS.peekCStringLen ( ptr `plusPtr` fromIntegral (bytesOffset b)+ , fromIntegral (bytesSize b)+ )+#endif+ -- A significant chunk of these data types are mutually recursive, which makes -- it impossible to derive TextShow instances for everything individually using -- Template Haskell. As a workaround, we splice everything together in a single@@ -179,7 +196,11 @@ , ''PatSynDir #endif -#if MIN_VERSION_template_haskell(2,16,0)+#if MIN_VERSION_template_haskell(2,16,0) && !(MIN_VERSION_template_haskell(2,17,0)) , ''Bytes+#endif++#if MIN_VERSION_template_haskell(2,17,0)+ , ''Specificity #endif ])
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name: text-show-instances-version: 3.8.3+version: 3.8.4 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,7 +71,8 @@ , GHC == 8.2.2 , GHC == 8.4.4 , GHC == 8.6.5- , GHC == 8.8.1+ , GHC == 8.8.3+ , GHC == 8.10.1 extra-source-files: CHANGELOG.md, README.md cabal-version: >=1.10 @@ -136,18 +137,18 @@ , binary >= 0.7.1 && < 0.9 , containers >= 0.5.5 && < 0.7 , directory >= 1.2.1 && < 1.4- , haskeline >= 0.7.1 && < 0.8+ , haskeline >= 0.7.1 && < 0.9 , hpc >= 0.6 && < 0.7 , old-locale >= 1 && < 1.1 , old-time >= 1.1 && < 1.2 , pretty >= 1.1.1 && < 1.2- , random >= 1.0.1 && < 1.2+ , random >= 1.0.1 && < 1.3 , semigroups >= 0.16.2 && < 1 , tagged >= 0.4.4 && < 1 , text >= 0.11.1 && < 1.3 , text-short >= 0.1 && < 0.2 , text-show >= 3.4 && < 4- , time >= 0.1 && < 1.10+ , time >= 0.1 && < 1.11 , unordered-containers >= 0.2 && < 0.3 , vector >= 0.12 && < 0.13 , xhtml >= 3000.2 && < 3000.3@@ -156,14 +157,14 @@ ghc-options: -Wall if flag(base-4-9)- build-depends: base >= 4.9 && < 4.14+ build-depends: base >= 4.9 && < 4.16 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.16- , ghc-boot-th >= 8.0 && < 8.9+ build-depends: template-haskell >= 2.11 && < 2.18+ , ghc-boot-th >= 8.0 && < 8.11 else build-depends: template-haskell >= 2.9 && < 2.11 @@ -260,35 +261,35 @@ , directory >= 1.2.1 && < 1.4 , generic-deriving >= 1.9 && < 2 , ghc-prim- , haskeline >= 0.7.1 && < 0.8+ , haskeline >= 0.7.1 && < 0.9 , hpc >= 0.6 && < 0.7 , hspec >= 2 && < 3 , old-locale >= 1 && < 1.1 , old-time >= 1.1 && < 1.2 , pretty >= 1.1.1 && < 1.2- , QuickCheck >= 2.12 && < 2.14+ , QuickCheck >= 2.12 && < 2.15 , quickcheck-instances >= 0.3.21 && < 0.4- , random >= 1.0.1 && < 1.2+ , 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.10+ , time >= 0.1 && < 1.11 , 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.14+ build-depends: base >= 4.9 && < 4.16 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.16- , ghc-boot-th >= 8.0 && < 8.9+ build-depends: template-haskell >= 2.11 && < 2.18+ , ghc-boot-th >= 8.0 && < 8.11 else build-depends: template-haskell >= 2.9 && < 2.11 @@ -302,6 +303,8 @@ hs-source-dirs: tests default-language: Haskell2010 ghc-options: -Wall -threaded -rtsopts+ if impl(ghc >= 8.6)+ ghc-options: -Wno-star-is-type if os(windows) build-depends: Win32 >= 2.1 && < 2.9