packages feed

text-show-instances 2.0.1 → 2.1

raw patch · 8 files changed

+83/−13 lines, 8 filesdep ~template-haskelldep ~text-showdep ~text-show-instancesPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: template-haskell, text-show, text-show-instances, transformers

API changes (from Hackage documentation)

+ TextShow.Instances: class TextShow a
+ TextShow.Instances: class TextShow1 (f :: * -> *)
+ TextShow.Instances: class TextShow2 (f :: * -> * -> *)
+ TextShow.Instances: showb :: TextShow a => a -> Builder
+ TextShow.Instances: showbList :: TextShow a => [a] -> Builder
+ TextShow.Instances: showbPrec :: TextShow a => Int -> a -> Builder
+ TextShow.Instances: showbPrecWith :: TextShow1 f => (Int -> a -> Builder) -> Int -> f a -> Builder
+ TextShow.Instances: showbPrecWith2 :: TextShow2 f => (Int -> a -> Builder) -> (Int -> b -> Builder) -> Int -> f a b -> Builder

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## 2.1+* Reexport the `TextShow` classes and module from `TextShow.Instances`. This helps Haddock readers discover what new instances are added with `text-show-instances`.+* Make `Tagged` instances poly-kinded+ ## 2.0.1 * Allow building with `vector-0.11` and above. Be aware that the `Show` instances for `Vector` types in `vector-0.11.0` are different from other versions of `vector`. 
README.md view
@@ -1,4 +1,19 @@-# `text-show-instances` [![Hackage version](https://img.shields.io/hackage/v/text-show-instances.svg?style=flat)](http://hackage.haskell.org/package/text-show-instances) [![Build Status](https://img.shields.io/travis/RyanGlScott/text-show-instances.svg?style=flat)](https://travis-ci.org/RyanGlScott/text-show-instances)+# `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]+[![Build](https://img.shields.io/travis/RyanGlScott/text-show-instances.svg)](https://travis-ci.org/RyanGlScott/text-show-instances)++[Hackage: text-show-instances]:+  http://hackage.haskell.org/package/text-show-instances+  "text-show-instances package on Hackage"+[Haskell.org]:+  http://www.haskell.org+  "The Haskell Programming Language"+[tl;dr Legal: BSD3]:+  https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29+  "BSD 3-Clause License (Revised)"  `text-show-instances` is a supplemental library to [`text-show`](https://github.com/RyanGlScott/text-show) that provides additional `Show` instances for data types in common Haskell libraries and GHC dependencies that are not encompassed by `text-show`. Currently, `text-show-instances` covers these libraries: 
src/TextShow/Data/Functor/Trans.hs view
@@ -1,5 +1,10 @@ {-# LANGUAGE CPP               #-} {-# LANGUAGE OverloadedStrings #-}++#if __GLASGOW_HASKELL__ >= 706+{-# LANGUAGE PolyKinds         #-}+#endif+ {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module:      TextShow.Data.Functor.Trans
src/TextShow/Data/Tagged.hs view
@@ -1,5 +1,10 @@ {-# LANGUAGE CPP               #-} {-# LANGUAGE OverloadedStrings #-}++#if __GLASGOW_HASKELL__ >= 706+{-# LANGUAGE PolyKinds         #-}+#endif+ {-# OPTIONS -fno-warn-orphans #-} {-| Module:      TextShow.Data.Tagged
src/TextShow/Data/Time.hs view
@@ -33,7 +33,6 @@  import Data.Fixed (Pico) import Data.Monoid.Compat-import Data.Semigroup (timesN) import Data.Time.Calendar (Day, toGregorian) import Data.Time.Clock (DiffTime, UTCTime, NominalDiffTime) import Data.Time.Clock.TAI (AbsoluteTime, taiToUTCTime)@@ -45,6 +44,7 @@                  fromString, lengthB, showbSpace, singleton) import TextShow.Data.Fixed (showbFixed) import TextShow.Data.Integral ()+import TextShow.Utils (mtimesDefault)  #if MIN_VERSION_time(1,5,0) import Data.Time.Format (TimeLocale)@@ -131,7 +131,7 @@  padN :: Int -> Char -> Builder -> Builder padN i _ b | i <= 0 = b-padN i c b          = timesN (fromIntegral i) (singleton c) <> b+padN i c b          = mtimesDefault i (singleton c) <> b {-# INLINE padN #-}  showb2 :: (Num t, Ord t, TextShow t) => NumericPadOption -> t -> Builder
src/TextShow/Instances.hs view
@@ -1,3 +1,9 @@+{-# LANGUAGE CPP #-}++#if __GLASGOW_HASKELL__ < 702+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+#endif+ {-| Module:      TextShow.Instances Copyright:   (C) 2014-2015 Ryan Scott@@ -11,7 +17,16 @@  /Since: 2/ -}-module TextShow.Instances () where+module TextShow.Instances (+    -- * Class re-exports+      TextShow(..)+    , TextShow1(..)+    , TextShow2(..)+    -- * Module re-export+    , module TextShow+    ) where++import TextShow  import TextShow.Compiler.Hoopl            () 
src/TextShow/Utils.hs view
@@ -1,4 +1,6 @@+{-# LANGUAGE CPP               #-} {-# LANGUAGE OverloadedStrings #-}+ {-| Module:      TextShow.Utils Copyright:   (C) 2014-2015 Ryan Scott@@ -9,10 +11,29 @@  Miscellaneous utility functions. -}-module TextShow.Utils (showbUnaryListWith, showbUnaryList) where+module TextShow.Utils (+      mtimesDefault+    , showbUnaryListWith+    , showbUnaryList+    ) where +#if MIN_VERSION_semigroups(0,17,0)+import Data.Semigroup (mtimesDefault)+#else+import Data.Semigroup (timesN)+#endif+ import TextShow (TextShow(showbPrec), Builder, showbUnaryWith) import TextShow.Data.List (showbListWith)++#if !(MIN_VERSION_semigroups(0,17,0))+-- | Repeat a value @n@ times.+--+-- > mtimesDefault n a = a <> a <> ... <> a  -- using <> (n-1) times+mtimesDefault :: (Integral b, Monoid a) => b -> a -> a+mtimesDefault = timesN . fromIntegral+{-# INLINE mtimesDefault #-}+#endif  -- | This pattern is used frequently when showing container types. showbUnaryListWith :: (a -> Builder) -> Int -> [a] -> Builder
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name:                text-show-instances-version:             2.0.1+version:             2.1 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@@ -65,7 +65,12 @@ copyright:           (C) 2014-2015 Ryan Scott category:            Text build-type:          Simple-tested-with:         GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.1+tested-with:         GHC == 7.0.4+                   , GHC == 7.2.2+                   , GHC == 7.4.2+                   , GHC == 7.6.3+                   , GHC == 7.8.4+                   , GHC == 7.10.1 extra-source-files:  CHANGELOG.md, README.md, include/inline.h cabal-version:       >=1.10 @@ -122,9 +127,9 @@                      , random               >= 1.0.1  && < 1.2                      , semigroups           >= 0.16.2 && < 1                      , tagged               >= 0.4.4  && < 1-                     , template-haskell     >= 2.5    && < 2.11+                     , template-haskell     >= 2.5    && < 2.12                      , text                 >= 0.11.1 && < 1.3-                     , text-show            >= 2      && < 2.1+                     , text-show            >= 2      && < 2.2                      , time                 >= 0.1    && < 1.6                      , transformers         >= 0.2.1  && < 0.5                      , transformers-compat  >= 0.3    && < 1@@ -144,7 +149,7 @@     build-depends:     terminfo             >= 0.3.2  && < 0.5                      , unix                 >= 2      && < 2.8 -test-suite text-show-instances-spec+test-suite spec   type:                exitcode-stdio-1.0   main-is:             Spec.hs   other-modules:       Instances.Compiler.Hoopl@@ -224,9 +229,9 @@                      , random               >= 1.0.1  && < 1.2                      , semigroups           >= 0.8.4  && < 1                      , tagged               >= 0.4.4  && < 1-                     , template-haskell     >= 2.5    && < 2.11-                     , text-show            >= 2      && < 2.1-                     , text-show-instances  == 2.0.1+                     , template-haskell     >= 2.5    && < 2.12+                     , text-show            >= 2      && < 2.2+                     , text-show-instances  == 2.1                      , th-orphans           >= 0.12   && < 1                      , time                 >= 0.1    && < 1.6                      , transformers         >= 0.2.1  && < 0.5