Skip to content

Commit 000c441

Browse files
author
Poscat
committed
fix overlapping instances
1 parent 46c76f6 commit 000c441

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Data/Aeson/Types/FromJSON.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ instance (RecordFromJSON arity f, FieldNames f) => FromTaggedFlatObject' arity f
14541454
instance FromTaggedFlatObject' arity U1 False where
14551455
parseTaggedFlatObject' _ _ = Tagged (pure U1)
14561456

1457-
instance PositionFromObject 1 arity f => FromTaggedFlatObject' arity f False where
1457+
instance OVERLAPPABLE_ PositionFromObject 1 arity f => FromTaggedFlatObject' arity f False where
14581458
parseTaggedFlatObject' (_ :* p) obj = Tagged (positionFromObject (Proxy :: Proxy 1) p obj)
14591459

14601460
class KnownNat n => PositionFromObject n arity f where

src/Data/Aeson/Types/ToJSON.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ instance RecordToPairs pairs enc arity f => TaggedFlatObject' pairs enc arity f
954954
instance Monoid pairs => TaggedFlatObject' enc pairs arity U1 False where
955955
taggedFlatObject' _ _ _ = Tagged mempty
956956

957-
instance PositionToPairs 1 pairs enc arity f => TaggedFlatObject' enc pairs arity f False where
957+
instance OVERLAPPABLE_ PositionToPairs 1 pairs enc arity f => TaggedFlatObject' enc pairs arity f False where
958958
taggedFlatObject' opts targs a = Tagged $ positionToPairs (Proxy :: Proxy 1) opts targs a
959959

960960
class KnownNat n => PositionToPairs n pairs enc arity f where

0 commit comments

Comments
 (0)