@@ -1,5 +1,6 @@
1{-# LANGUAGE CPP #-}
1{-# LANGUAGE CPP #-}
2{-# LANGUAGE DefaultSignatures #-}
2{-# LANGUAGE DefaultSignatures #-}
3+{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE FlexibleContexts #-}
5{-# LANGUAGE FlexibleContexts #-}
5{-# LANGUAGE GeneralizedNewtypeDeriving #-}
6{-# LANGUAGE GeneralizedNewtypeDeriving #-}
@@ -585,7 +586,7 @@ instance (ApproxEq l, Show l, ApproxEq r, Show r) => ApproxEq (Either l r) where
585 Left a =~ Left b = a =~ b
586 Left a =~ Left b = a =~ b
586 Right a =~ Right b = a =~ b
587 Right a =~ Right b = a =~ b
587 _ =~ _ = False
588 _ =~ _ = False
588− showApproxEq (Left x) = "Left " <> showApproxEq x
589+ showApproxEq (Left x) = "Left " <> showApproxEq x
589 showApproxEq (Right x) = "Right " <> showApproxEq x
590 showApproxEq (Right x) = "Right " <> showApproxEq x
590instance ApproxEq NodeAttrFilter
591instance ApproxEq NodeAttrFilter
591instance ApproxEq NodeAttrName
592instance ApproxEq NodeAttrName
@@ -665,8 +666,8 @@ getSource = fmap _source . foundResult
665grabFirst :: Either EsError (SearchResult a) -> Either EsError a
666grabFirst :: Either EsError (SearchResult a) -> Either EsError a
666grabFirst r =
667grabFirst r =
667 case fmap (hitSource . head . hits . searchHits) r of
668 case fmap (hitSource . head . hits . searchHits) r of
668− (Left e) -> Left e
669+ (Left e) -> Left e
669− (Right Nothing) -> Left (EsError 500 "Source was missing")
670+ (Right Nothing) -> Left (EsError 500 "Source was missing")
670 (Right (Just x)) -> Right x
671 (Right (Just x)) -> Right x
672-------------------------------------------------------------------------------
673-------------------------------------------------------------------------------
@@ -903,7 +904,7 @@ $(derive makeArbitrary ''FsSnapshotRepo)
903$(derive makeArbitrary ''SnapshotRepoName)
904$(derive makeArbitrary ''SnapshotRepoName)
905newtype UpdatableIndexSetting' = UpdatableIndexSetting' UpdatableIndexSetting
906newtype UpdatableIndexSetting' = UpdatableIndexSetting' UpdatableIndexSetting
906− deriving (Show, Eq, ToJSON, FromJSON, ApproxEq)
907+ deriving (Show, Eq, ToJSON, FromJSON, ApproxEq, Typeable)
908instance Arbitrary UpdatableIndexSetting' where
909instance Arbitrary UpdatableIndexSetting' where
909 arbitrary = do
910 arbitrary = do