@@ -1123,14 +1123,14 @@ parseNonAllNullarySum p@(tname :* opts :* _) =
11231123 " , but found tag " ++ show tag
11241124 cnames_ = unTagged2 (constructorTags (constructorTagModifier opts) :: Tagged2 f [String ])
11251125
1126- TaggedFlatObject {.. } ->
1126+ TaggedFlatObject {.. } ->
11271127 withObject tname $ \ obj -> do
11281128 let tagKey = pack tagFieldName
11291129 badTag tag = failWith_ $ \ cnames ->
11301130 " expected tag field to be one of " ++ show cnames ++
11311131 " , but found tag " ++ show tag
11321132 cnames_ = unTagged2 (constructorTags (constructorTagModifier opts) :: Tagged2 f [String ])
1133- tag <- contextType tname . contextTag tagKey cnames_ $ obj .: tagKey
1133+ tag <- contextType tname . contextTag tagKey cnames_ $ obj .: tagKey
11341134 fromMaybe (badTag tag <?> Key tagKey) $
11351135 parseTaggedFlatObject (tag :* p) obj
11361136
@@ -1454,9 +1454,9 @@ instance (RecordFromJSON arity f, FieldNames f) => FromTaggedFlatObject' arity f
14541454instance FromTaggedFlatObject' arity U1 False where
14551455 parseTaggedFlatObject' _ _ = Tagged (pure U1 )
14561456
1457- instance OVERLAPPABLE_ PositionFromObject 1 arity f => FromTaggedFlatObject' arity f False where
1458- parseTaggedFlatObject' (_ :* p) obj = Tagged (positionFromObject (Proxy :: Proxy 1 ) p obj)
1459-
1457+ instance OVERLAPPABLE_ PositionFromObject 0 arity f => FromTaggedFlatObject' arity f False where
1458+ parseTaggedFlatObject' (_ :* p) obj = Tagged (positionFromObject (Proxy :: Proxy 0 ) p obj)
1459+
14601460class KnownNat n => PositionFromObject n arity f where
14611461 positionFromObject :: Proxy n
14621462 -> TypeName :* Options :* FromArgs arity a
0 commit comments