Skip to content

Commit 570dd35

Browse files
committed
Matching Down instance instead of Min
1 parent 57cd653 commit 570dd35

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/Data/Aeson/Types/FromJSON.hs

+2-14
Original file line numberDiff line numberDiff line change
@@ -2335,33 +2335,21 @@ instance FromJSON a => FromJSON (Monoid.Dual a) where
23352335
parseJSON = parseJSON1
23362336

23372337
instance FromJSON1 Monoid.Sum where
2338-
liftParseJSON _ p _ a = coerce (p a)
2339-
2340-
liftParseJSONList _ _ p a = coerce (p a)
2338+
liftParseJSON _ p _ = coerce p
23412339

23422340
liftOmittedField = coerce
23432341

23442342
instance (FromJSON a) => FromJSON (Monoid.Sum a) where
23452343
parseJSON = parseJSON1
23462344

2347-
parseJSONList = liftParseJSONList omittedField parseJSON parseJSONList
2348-
2349-
omittedField = omittedField1
2350-
23512345
instance FromJSON1 Monoid.Product where
2352-
liftParseJSON _ p _ a = coerce (p a)
2353-
2354-
liftParseJSONList _ _ p a = coerce (p a)
2346+
liftParseJSON _ p _ = coerce p
23552347

23562348
liftOmittedField = coerce
23572349

23582350
instance (FromJSON a) => FromJSON (Monoid.Product a) where
23592351
parseJSON = parseJSON1
23602352

2361-
parseJSONList = liftParseJSONList omittedField parseJSON parseJSONList
2362-
2363-
omittedField = omittedField1
2364-
23652353
instance FromJSON Monoid.All where
23662354
parseJSON = coerce . (parseJSON :: Value -> Parser Bool)
23672355

0 commit comments

Comments
 (0)