You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ns...@apache.org on 2016/01/20 16:09:15 UTC

thrift git commit: THRIFT-3570 Remove duplicate instances that are added by upstream Client: Haskell Patch: Nobuaki Sukegawa

Repository: thrift
Updated Branches:
  refs/heads/master 217a44b9d -> 71398bb25


THRIFT-3570 Remove duplicate instances that are added by upstream
Client: Haskell
Patch: Nobuaki Sukegawa

This closes #808


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/71398bb2
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/71398bb2
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/71398bb2

Branch: refs/heads/master
Commit: 71398bb25f06ce3d7c89b9cac1bbed66fe35ec1f
Parents: 217a44b
Author: Nobuaki Sukegawa <ns...@apache.org>
Authored: Wed Jan 20 01:21:52 2016 +0900
Committer: Nobuaki Sukegawa <ns...@apache.org>
Committed: Thu Jan 21 00:08:52 2016 +0900

----------------------------------------------------------------------
 lib/hs/Thrift.cabal              | 4 ++--
 lib/hs/src/Thrift/Arbitraries.hs | 6 ------
 lib/hs/src/Thrift/Types.hs       | 6 ------
 3 files changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/71398bb2/lib/hs/Thrift.cabal
----------------------------------------------------------------------
diff --git a/lib/hs/Thrift.cabal b/lib/hs/Thrift.cabal
index 6f6a150..fd3f692 100644
--- a/lib/hs/Thrift.cabal
+++ b/lib/hs/Thrift.cabal
@@ -40,7 +40,7 @@ Library
   Hs-Source-Dirs:
     src
   Build-Depends:
-    base >= 4, base < 5, containers, ghc-prim, attoparsec, binary, bytestring >= 0.10, base64-bytestring, hashable, HTTP, text, unordered-containers, vector, QuickCheck, split
+    base >= 4, base < 5, containers, ghc-prim, attoparsec, binary, bytestring >= 0.10, base64-bytestring, hashable, HTTP, text, unordered-containers >= 0.2.6, vector, QuickCheck >= 2.8.2, split
   if flag(network-uri)
      build-depends: network-uri >= 2.6, network >= 2.6
   else
@@ -77,4 +77,4 @@ Test-Suite spec
   Hs-Source-Dirs: test
   Ghc-Options: -Wall
   main-is: Spec.hs
-  Build-Depends: base, thrift, hspec, QuickCheck, bytestring >= 0.10, unordered-containers
+  Build-Depends: base, thrift, hspec, QuickCheck >= 2.8.2, bytestring >= 0.10, unordered-containers >= 0.2.6

http://git-wip-us.apache.org/repos/asf/thrift/blob/71398bb2/lib/hs/src/Thrift/Arbitraries.hs
----------------------------------------------------------------------
diff --git a/lib/hs/src/Thrift/Arbitraries.hs b/lib/hs/src/Thrift/Arbitraries.hs
index 3a60ed2..e9c0fc3 100644
--- a/lib/hs/src/Thrift/Arbitraries.hs
+++ b/lib/hs/src/Thrift/Arbitraries.hs
@@ -26,12 +26,6 @@ import qualified Data.ByteString.Lazy as BS
 instance Arbitrary ByteString where
   arbitrary = BS.pack . filter (/= 0) <$> arbitrary
 
-instance (Ord k, Arbitrary k, Arbitrary v) => Arbitrary (Map k v) where
-  arbitrary = Map.fromList <$> arbitrary
-
-instance (Ord k, Arbitrary k) => Arbitrary (Set.Set k) where
-  arbitrary = Set.fromList <$> arbitrary
-
 instance (Arbitrary k) => Arbitrary (Vector.Vector k) where
   arbitrary = Vector.fromList <$> arbitrary
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/71398bb2/lib/hs/src/Thrift/Types.hs
----------------------------------------------------------------------
diff --git a/lib/hs/src/Thrift/Types.hs b/lib/hs/src/Thrift/Types.hs
index 8719e72..2a20025 100644
--- a/lib/hs/src/Thrift/Types.hs
+++ b/lib/hs/src/Thrift/Types.hs
@@ -31,12 +31,6 @@ import qualified Data.HashMap.Strict as Map
 import qualified Data.HashSet as Set
 import qualified Data.Vector as Vector
 
-instance (Hashable k, Hashable v) => Hashable (Map.HashMap k v) where
-  hashWithSalt salt = foldl' hashWithSalt salt . Map.toList
-
-instance (Hashable a) => Hashable (Set.HashSet a) where
-  hashWithSalt = foldl' hashWithSalt
-
 instance (Hashable a) => Hashable (Vector.Vector a) where
   hashWithSalt = Vector.foldl' hashWithSalt