From 029d91e5f3dbb51ed07b01253f1c515e8bf3ffcb Mon Sep 17 00:00:00 2001 From: Tim McGilchrist Date: Fri, 2 Jun 2017 08:59:29 +1000 Subject: [PATCH] Fixup warnings about unused function and redundant constraints. --- src/Database/V1/Bloodhound/Types.hs | 5 +---- src/Database/V5/Bloodhound/Types.hs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Database/V1/Bloodhound/Types.hs b/src/Database/V1/Bloodhound/Types.hs index 64410df..848cbeb 100644 --- a/src/Database/V1/Bloodhound/Types.hs +++ b/src/Database/V1/Bloodhound/Types.hs @@ -5460,9 +5460,6 @@ instance FromJSON PhraseSuggesterCollate where return $ PhraseSuggesterCollate (TemplateQueryInline inline' params') prune' parseJSON x = typeMismatch "PhraseSuggesterCollate" x -mkPhraseSuggesterCollate :: TemplateQueryInline -> PhraseSuggesterCollate -mkPhraseSuggesterCollate tQuery = PhraseSuggesterCollate tQuery False - data SuggestOptions = SuggestOptions { suggestOptionsText :: Text , suggestOptionsScore :: Double @@ -5509,4 +5506,4 @@ instance FromJSON NamedSuggestionResponse where suggestionResponses' <- o .: suggestionName' return $ NamedSuggestionResponse suggestionName' suggestionResponses' - parseJSON x = typeMismatch "NamedSuggestionResponse" x \ No newline at end of file + parseJSON x = typeMismatch "NamedSuggestionResponse" x diff --git a/src/Database/V5/Bloodhound/Types.hs b/src/Database/V5/Bloodhound/Types.hs index 09ddd38..ca81f9d 100644 --- a/src/Database/V5/Bloodhound/Types.hs +++ b/src/Database/V5/Bloodhound/Types.hs @@ -2098,7 +2098,7 @@ instance BucketAggregation DateRangeResult where docCount = dateRangeDocCount aggs = dateRangeAggs -instance (FromJSON a, BucketAggregation a) => FromJSON (Bucket a) where +instance (FromJSON a) => FromJSON (Bucket a) where parseJSON (Object v) = Bucket <$> v .: "buckets" parseJSON _ = mempty @@ -5238,9 +5238,6 @@ instance FromJSON PhraseSuggesterCollate where return $ PhraseSuggesterCollate (TemplateQueryInline inline' params') prune' parseJSON x = typeMismatch "PhraseSuggesterCollate" x -mkPhraseSuggesterCollate :: TemplateQueryInline -> PhraseSuggesterCollate -mkPhraseSuggesterCollate tQuery = PhraseSuggesterCollate tQuery False - data SuggestOptions = SuggestOptions { suggestOptionsText :: Text , suggestOptionsScore :: Double