on master help sign in
Merge pull request #493 from phadej/identity-key

Remove unncessary constraints from To/FromJSONkey Identity

commit9c3ba148bdd31cbc5044fbbccb37cc3a9aae09ff authorAdam Bergmark <adam@bergmark.nl> dateFri 16 Dec 2016, 17:00 (10 years ago) parent5f230ed28e3454
2 files changed+2−2
Data/Aeson/Types/FromJSON.hs+1−1 Data/Aeson/Types/ToJSON.hs+1−1
Data/Aeson/Types/FromJSON.hs+1−1
@@ -1361,7 +1361,7 @@ instance (FromJSON a) => FromJSON (Identity a) where
13611361 parseJSONList = liftParseJSONList parseJSON parseJSONList
13621362 {-# INLINE parseJSONList #-}
13631363
1364−instance (FromJSONKey a, FromJSON a) => FromJSONKey (Identity a) where
1364+instance (FromJSONKey a) => FromJSONKey (Identity a) where
13651365 fromJSONKey = coerceFromJSONKeyFunction (fromJSONKey :: FromJSONKeyFunction a)
13661366 fromJSONKeyList = coerceFromJSONKeyFunction (fromJSONKeyList :: FromJSONKeyFunction [a])
13671367
Data/Aeson/Types/ToJSON.hs+1−1
@@ -1670,7 +1670,7 @@ instance (ToJSON a) => ToJSON (Identity a) where
16701670 toEncodingList = liftToEncodingList toEncoding toEncodingList
16711671 {-# INLINE toEncodingList #-}
16721672
1673−instance (ToJSONKey a, ToJSON a) => ToJSONKey (Identity a) where
1673+instance (ToJSONKey a) => ToJSONKey (Identity a) where
16741674 toJSONKey = contramapToJSONKeyFunction runIdentity toJSONKey
16751675 toJSONKeyList = contramapToJSONKeyFunction (map runIdentity) toJSONKeyList
16761676