packages feed

pinch 0.3.2.0 → 0.3.3.0

raw patch · 5 files changed

+47/−31 lines, 5 filesdep +semigroupsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: semigroups

API changes (from Hackage documentation)

- Pinch.Internal.Generic: instance (Pinch.Internal.Pinchable.Pinchable a, GHC.TypeLits.KnownNat n) => Pinch.Internal.Pinchable.GPinchable (GHC.Generics.K1 i (Pinch.Internal.Generic.Field n (GHC.Base.Maybe a)))
- Pinch.Internal.Generic: instance (Pinch.Internal.Pinchable.Pinchable a, GHC.TypeLits.KnownNat n) => Pinch.Internal.Pinchable.GPinchable (GHC.Generics.K1 i (Pinch.Internal.Generic.Field n a))
- Pinch.Internal.Generic: instance GHC.TypeLits.KnownNat n => Pinch.Internal.Pinchable.GPinchable (GHC.Generics.K1 i (Pinch.Internal.Generic.Enumeration n))
- Pinch.Internal.Pinchable: instance (GHC.Classes.Ord a, Pinch.Internal.Pinchable.Pinchable a) => Pinch.Internal.Pinchable.Pinchable (Data.Set.Base.Set a)
- Pinch.Internal.Pinchable: instance (GHC.Classes.Ord k, Pinch.Internal.Pinchable.Pinchable k, Pinch.Internal.Pinchable.Pinchable v) => Pinch.Internal.Pinchable.Pinchable (Data.Map.Base.Map k v)
+ Pinch.Internal.Builder: instance Data.Semigroup.Semigroup Pinch.Internal.Builder.Builder
+ Pinch.Internal.FoldList: instance Data.Semigroup.Semigroup (Pinch.Internal.FoldList.FoldList a)
+ Pinch.Internal.Generic: instance (Pinch.Internal.Pinchable.Pinchable a, GHC.TypeNats.KnownNat n) => Pinch.Internal.Pinchable.GPinchable (GHC.Generics.K1 i (Pinch.Internal.Generic.Field n (GHC.Base.Maybe a)))
+ Pinch.Internal.Generic: instance (Pinch.Internal.Pinchable.Pinchable a, GHC.TypeNats.KnownNat n) => Pinch.Internal.Pinchable.GPinchable (GHC.Generics.K1 i (Pinch.Internal.Generic.Field n a))
+ Pinch.Internal.Generic: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Pinch.Internal.Generic.Field n a)
+ Pinch.Internal.Generic: instance GHC.TypeNats.KnownNat n => Pinch.Internal.Pinchable.GPinchable (GHC.Generics.K1 i (Pinch.Internal.Generic.Enumeration n))
+ Pinch.Internal.Pinchable: instance (GHC.Classes.Ord a, Pinch.Internal.Pinchable.Pinchable a) => Pinch.Internal.Pinchable.Pinchable (Data.Set.Internal.Set a)
+ Pinch.Internal.Pinchable: instance (GHC.Classes.Ord k, Pinch.Internal.Pinchable.Pinchable k, Pinch.Internal.Pinchable.Pinchable v) => Pinch.Internal.Pinchable.Pinchable (Data.Map.Internal.Map k v)
- Pinch: class IsTType (Tag a) => Pinchable a where type Tag a type Tag a = GTag (Rep a) pinch = genericPinch unpinch = genericUnpinch where {
+ Pinch: class IsTType (Tag a) => Pinchable a where {
- Pinch.Internal.FoldList: foldl' :: Foldable t => forall b a. (b -> a -> b) -> b -> t a -> b
+ Pinch.Internal.FoldList: foldl' :: Foldable t => forall b a. () => (b -> a -> b) -> b -> t a -> b
- Pinch.Internal.FoldList: foldr :: Foldable t => forall a b. (a -> b -> b) -> b -> t a -> b
+ Pinch.Internal.FoldList: foldr :: Foldable t => forall a b. () => (a -> b -> b) -> b -> t a -> b
- Pinch.Internal.FoldList: mapM :: Traversable t => forall (m :: * -> *) a b. Monad m => (a -> m b) -> t a -> m (t b)
+ Pinch.Internal.FoldList: mapM :: Traversable t => forall (m :: * -> *) a b. Monad m => (a -> m b) -> t a -> m t b
- Pinch.Internal.FoldList: sequence :: Traversable t => forall (m :: * -> *) a. Monad m => t (m a) -> m (t a)
+ Pinch.Internal.FoldList: sequence :: Traversable t => forall (m :: * -> *) a. Monad m => t m a -> m t a
- Pinch.Internal.FoldList: toList :: Foldable t => forall a. t a -> [a]
+ Pinch.Internal.FoldList: toList :: Foldable t => forall a. () => t a -> [a]
- Pinch.Internal.Pinchable: class IsTType (GTag f) => GPinchable (f :: * -> *) where type GTag f where {
+ Pinch.Internal.Pinchable: class IsTType (GTag f) => GPinchable (f :: * -> *) where {
- Pinch.Internal.Pinchable: class IsTType (Tag a) => Pinchable a where type Tag a type Tag a = GTag (Rep a) pinch = genericPinch unpinch = genericUnpinch where {
+ Pinch.Internal.Pinchable: class IsTType (Tag a) => Pinchable a where {

Files

CHANGES.md view
@@ -1,3 +1,10 @@+0.3.3.0 (2018-06-15)+====================++-   Add Semigroup instances for some internal types. This improves GHC 8.4+    compatibility.++ 0.3.2.0 (2017-06-03) ==================== 
pinch.cabal view
@@ -1,9 +1,11 @@--- This file has been generated from package.yaml by hpack version 0.15.0.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack+--+-- hash: 81e0ecf2f54c375e7fea61c471bd14781b8d75e4df2e4275e35022d78671ba9e  name:           pinch-version:        0.3.2.0+version:        0.3.3.0 cabal-version:  >= 1.10 build-type:     Simple license:        BSD3@@ -26,7 +28,6 @@                 aims to provide an alternative implementation of Thrift for Haskell. category:       Development author:         Abhinav Gupta- extra-source-files:     bench/pinch-bench/Bench.hs     bench/pinch-bench/pinch-bench.cabal@@ -48,16 +49,17 @@         src     ghc-options: -Wall     build-depends:-        base >= 4.7 && < 5,-        bytestring >= 0.10 && < 0.11,-        containers >= 0.5 && < 0.6,-        text >= 1.2 && < 1.3,-        unordered-containers >= 0.2 && < 0.3,-        vector >= 0.10 && < 0.13,-        array >= 0.5,-        deepseq >= 1.3 && < 1.5,+        array >=0.5,+        base >=4.7 && <5,+        bytestring >=0.10 && <0.11,+        containers >=0.5 && <0.6,+        deepseq >=1.3 && <1.5,         ghc-prim,-        hashable >= 1.2 && < 1.3+        hashable >=1.2 && <1.3,+        semigroups >=0.18 && <0.19,+        text >=1.2 && <1.3,+        unordered-containers >=0.2 && <0.3,+        vector >=0.10 && <0.13     exposed-modules:         Pinch         Pinch.Internal.Builder@@ -84,16 +86,17 @@         tests     ghc-options: -Wall     build-depends:-        base >= 4.7 && < 5,-        bytestring >= 0.10 && < 0.11,-        containers >= 0.5 && < 0.6,-        text >= 1.2 && < 1.3,-        unordered-containers >= 0.2 && < 0.3,-        vector >= 0.10 && < 0.13,-        hspec >= 2.0,-        hspec-discover >= 2.1,+        QuickCheck >=2.5,+        base >=4.7 && <5,+        bytestring >=0.10 && <0.11,+        containers >=0.5 && <0.6,+        hspec >=2.0,+        hspec-discover >=2.1,         pinch,-        QuickCheck >= 2.5+        semigroups >=0.18 && <0.19,+        text >=1.2 && <1.3,+        unordered-containers >=0.2 && <0.3,+        vector >=0.10 && <0.13     other-modules:         Pinch.Arbitrary         Pinch.Expectations@@ -108,4 +111,5 @@         Pinch.Internal.ValueSpec         Pinch.Protocol.BinarySpec         Pinch.Protocol.CompactSpec+        Paths_pinch     default-language: Haskell2010
src/Pinch/Internal/Builder.hs view
@@ -27,13 +27,10 @@     , byteString     ) where -#if __GLASGOW_HASKELL__ < 709-import Data.Monoid-#endif- import Data.ByteString              (ByteString) import Data.ByteString.Builder.Prim ((>*<)) import Data.Int+import Data.Semigroup import Data.Word                    (Word8) import Foreign.ForeignPtr           (withForeignPtr) import Foreign.Ptr                  (Ptr, plusPtr)@@ -56,6 +53,10 @@ {-# INLINE [1] append #-}     -- Don't inline append until phase 1. This ensures that the     -- append/primFixed* rules have a chance to fire.++instance Semigroup Builder where+    (<>) = append+    sconcat = foldr (<>) mempty  instance Monoid Builder where     {-# INLINE mempty #-}
src/Pinch/Internal/FoldList.hs view
@@ -34,7 +34,7 @@ import Control.DeepSeq (NFData (..)) import Data.Hashable   (Hashable (..)) import Data.List       (intercalate)-import Data.Monoid+import Data.Semigroup import Data.Typeable   (Typeable)  import qualified Control.Monad    as M@@ -96,7 +96,7 @@     {-# INLINE fmap #-}  instance F.Foldable FoldList where-    foldMap f (FoldList l) = l (\r a -> r <> f a) mempty+    foldMap f (FoldList l) = l (\r a -> r `mappend` f a) mempty     {-# INLINE foldMap #-}      foldl' f r (FoldList l) = l f r@@ -119,10 +119,14 @@ instance Hashable a => Hashable (FoldList a) where     hashWithSalt s (FoldList l) = l hashWithSalt s +instance Semigroup (FoldList a) where+    FoldList f1 <> FoldList f2 =+        FoldList $ \cons nil -> f2 cons (f1 cons nil)+    {-# INLINE (<>) #-}+ instance Monoid (FoldList a) where     mempty = FoldList (\_ r -> r)     {-# INLINE mempty #-} -    FoldList f1 `mappend` FoldList f2 =-        FoldList $ \cons nil -> f2 cons (f1 cons nil)+    FoldList f1 `mappend` FoldList f2 = FoldList $ \cons nil -> f2 cons (f1 cons nil)     {-# INLINE mappend #-}
src/Pinch/Internal/Generic.hs view
@@ -47,10 +47,10 @@  #if __GLASGOW_HASKELL__ < 709 import Data.Foldable    (Foldable)-import Data.Monoid      (Monoid) import Data.Traversable (Traversable) #endif +import Data.Semigroup import Control.Applicative import Control.DeepSeq     (NFData) import Data.Proxy          (Proxy (..))@@ -126,7 +126,7 @@ -- new data type. newtype Field (n :: Nat) a = Field a   deriving-    (Bounded, Eq, Enum, Foldable, Functor, Generic, Monoid, NFData, Ord, Show,+    (Bounded, Eq, Enum, Foldable, Functor, Generic, Semigroup, Monoid, NFData, Ord, Show,      Traversable, Typeable)  -- | Gets the current value of a field.