@@ -18,6 +18,7 @@
18{-# LANGUAGE PolyKinds #-}
18{-# LANGUAGE PolyKinds #-}
21+#include "incoherent-compat.h"
21#include "overlapping-compat.h"
22#include "overlapping-compat.h"
23-- TODO: Drop this when we remove support for Data.Attoparsec.Number
24-- TODO: Drop this when we remove support for Data.Attoparsec.Number
@@ -942,9 +943,8 @@ instance ( FromRecord arity a
942 (:*:) <$> parseRecord opts fargs Nothing obj
943 (:*:) <$> parseRecord opts fargs Nothing obj
943 <*> parseRecord opts fargs Nothing obj
944 <*> parseRecord opts fargs Nothing obj
945−instance ( Selector s
946+instance OVERLAPPABLE_ (Selector s, GFromJSON arity a) =>
947− ) => FromRecord arity (S1 s a) where
947+ FromRecord arity (S1 s a) where
948 parseRecord opts fargs lab =
948 parseRecord opts fargs lab =
949 (<?> Key label) . gParseJSON opts fargs <=< (.: label)
949 (<?> Key label) . gParseJSON opts fargs <=< (.: label)
@@ -952,7 +952,7 @@ instance ( Selector s
952 defLabel = pack . fieldLabelModifier opts $
952 defLabel = pack . fieldLabelModifier opts $
953 selName (undefined :: t s a p)
953 selName (undefined :: t s a p)
955−instance OVERLAPPING_ (Selector s, FromJSON a) =>
955+instance INCOHERENT_ (Selector s, FromJSON a) =>
956 FromRecord arity (S1 s (K1 i (Maybe a))) where
956 FromRecord arity (S1 s (K1 i (Maybe a))) where
957 parseRecord _ _ (Just lab) obj = (M1 . K1) <$> obj .:? lab
957 parseRecord _ _ (Just lab) obj = (M1 . K1) <$> obj .:? lab
958 parseRecord opts _ Nothing obj = (M1 . K1) <$> obj .:? pack label
958 parseRecord opts _ Nothing obj = (M1 . K1) <$> obj .:? pack label