@@ -18,6 +18,7 @@
1818{-# LANGUAGE PolyKinds #-}
1919#endif
2020
21+#include "incoherent-compat.h"
2122#include "overlapping-compat.h"
2223
2324-- TODO: Drop this when we remove support for Data.Attoparsec.Number
@@ -942,9 +943,8 @@ instance ( FromRecord arity a
942943 (:*:) <$> parseRecord opts fargs Nothing obj
943944 <*> parseRecord opts fargs Nothing obj
944945
945−instance ( Selector s
946− , GFromJSON arity a
947− ) => FromRecord arity (S1 s a) where
946+instance OVERLAPPABLE_ (Selector s, GFromJSON arity a) =>
947+ FromRecord arity (S1 s a) where
948948 parseRecord opts fargs lab =
949949 (<?> Key label) . gParseJSON opts fargs <=< (.: label)
950950 where
@@ -952,7 +952,7 @@ instance ( Selector s
952952 defLabel = pack . fieldLabelModifier opts $
953953 selName (undefined :: t s a p)
954954
955−instance OVERLAPPING_ (Selector s, FromJSON a) =>
955+instance INCOHERENT_ (Selector s, FromJSON a) =>
956956 FromRecord arity (S1 s (K1 i (Maybe a))) where
957957 parseRecord _ _ (Just lab) obj = (M1 . K1) <$> obj .:? lab
958958 parseRecord opts _ Nothing obj = (M1 . K1) <$> obj .:? pack label