git.iko.soy/typeable/bloodhound
on master help sign in
Drop redundant constraints
6cc41edMichael Xavier
src/Database/Bloodhound/Types.hs+1−1
@@ -2012,7 +2012,7 @@ instance BucketAggregation DateRangeResult where
2012 docCount = dateRangeDocCount
2012 docCount = dateRangeDocCount
2013 aggs = dateRangeAggs
2013 aggs = dateRangeAggs
2014
2014
2015−instance (FromJSON a, BucketAggregation a) => FromJSON (Bucket a) where
2015+instance (FromJSON a) => FromJSON (Bucket a) where
2016 parseJSON (Object v) = Bucket <$>
2016 parseJSON (Object v) = Bucket <$>
2017 v .: "buckets"
2017 v .: "buckets"
2018 parseJSON _ = mempty
2018 parseJSON _ = mempty
tests/tests.hs+3−3
@@ -586,7 +586,7 @@ instance ApproxEq Vers.Version where
586 (=~) = (==)
586 (=~) = (==)
587instance (ApproxEq a, Show a) => ApproxEq [a] where
587instance (ApproxEq a, Show a) => ApproxEq [a] where
588 as =~ bs = and (zipWith (=~) as bs)
588 as =~ bs = and (zipWith (=~) as bs)
589−instance (ApproxEq l, Show l, ApproxEq r, Show r) => ApproxEq (Either l r) where
589+instance (ApproxEq l, ApproxEq r) => ApproxEq (Either l r) where
590 Left a =~ Left b = a =~ b
590 Left a =~ Left b = a =~ b
591 Right a =~ Right b = a =~ b
591 Right a =~ Right b = a =~ b
592 _ =~ _ = False
592 _ =~ _ = False
@@ -643,7 +643,7 @@ instance Arbitrary a => Arbitrary (NonEmpty a) where
643arbitraryScore :: Gen Score
643arbitraryScore :: Gen Score
644arbitraryScore = fmap getPositive <$> arbitrary
644arbitraryScore = fmap getPositive <$> arbitrary
645
645
646−instance (Arbitrary a, Typeable a) => Arbitrary (Hit a) where
646+instance (Arbitrary a) => Arbitrary (Hit a) where
647 arbitrary = Hit <$> arbitrary
647 arbitrary = Hit <$> arbitrary
648 <*> arbitrary
648 <*> arbitrary
649 <*> arbitrary
649 <*> arbitrary
@@ -653,7 +653,7 @@ instance (Arbitrary a, Typeable a) => Arbitrary (Hit a) where
653 shrink = genericShrink
653 shrink = genericShrink
654
654
655
655
656−instance (Arbitrary a, Typeable a) => Arbitrary (SearchHits a) where
656+instance (Arbitrary a) => Arbitrary (SearchHits a) where
657 arbitrary = reduceSize $ do
657 arbitrary = reduceSize $ do
658 tot <- getPositive <$> arbitrary
658 tot <- getPositive <$> arbitrary
659 score <- arbitraryScore
659 score <- arbitraryScore