@@ -1616,39 +1616,75 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e,
1616 <*> parseJSONElemAtIndex 14 ary
1616 <*> parseJSONElemAtIndex 14 ary
1617 {-# INLINE parseJSON #-}
1617 {-# INLINE parseJSON #-}
1619+instance ToJSON1 Dual where
1620+ liftToJSON to = to . getDual
1621+ {-# INLINE liftToJSON #-}
1623+ liftToEncoding to = to . getDual
1624+ {-# INLINE liftToEncoding #-}
1619instance ToJSON a => ToJSON (Dual a) where
1626instance ToJSON a => ToJSON (Dual a) where
1620− toJSON = toJSON . getDual
1627+ toJSON = toJSON1
1621 {-# INLINE toJSON #-}
1628 {-# INLINE toJSON #-}
1623− toEncoding = toEncoding . getDual
1630+ toEncoding = toEncoding1
1624 {-# INLINE toEncoding #-}
1631 {-# INLINE toEncoding #-}
1633+instance FromJSON1 Dual where
1634+ liftParseJSON p = fmap Dual . p
1635+ {-# INLINE liftParseJSON #-}
1626instance FromJSON a => FromJSON (Dual a) where
1637instance FromJSON a => FromJSON (Dual a) where
1627− parseJSON = fmap Dual . parseJSON
1638+ parseJSON = parseJSON1
1628 {-# INLINE parseJSON #-}
1639 {-# INLINE parseJSON #-}
1642+instance ToJSON1 First where
1643+ liftToJSON to = liftToJSON to . getFirst
1644+ {-# INLINE liftToJSON #-}
1646+ liftToEncoding to = liftToEncoding to . getFirst
1647+ {-# INLINE liftToEncoding #-}
1630instance ToJSON a => ToJSON (First a) where
1649instance ToJSON a => ToJSON (First a) where
1631− toJSON = toJSON . getFirst
1650+ toJSON = toJSON1
1632 {-# INLINE toJSON #-}
1651 {-# INLINE toJSON #-}
1634− toEncoding = toEncoding . getFirst
1653+ toEncoding = toEncoding1
1635 {-# INLINE toEncoding #-}
1654 {-# INLINE toEncoding #-}
1656+instance FromJSON1 First where
1657+ liftParseJSON p = fmap First . liftParseJSON p
1658+ {-# INLINE liftParseJSON #-}
1637instance FromJSON a => FromJSON (First a) where
1660instance FromJSON a => FromJSON (First a) where
1638− parseJSON = fmap First . parseJSON
1661+ parseJSON = parseJSON1
1639 {-# INLINE parseJSON #-}
1662 {-# INLINE parseJSON #-}
1665+instance ToJSON1 Last where
1666+ liftToJSON to = liftToJSON to . getLast
1667+ {-# INLINE liftToJSON #-}
1669+ liftToEncoding to = liftToEncoding to . getLast
1670+ {-# INLINE liftToEncoding #-}
1641instance ToJSON a => ToJSON (Last a) where
1672instance ToJSON a => ToJSON (Last a) where
1642− toJSON = toJSON . getLast
1673+ toJSON = toJSON1
1643 {-# INLINE toJSON #-}
1674 {-# INLINE toJSON #-}
1645− toEncoding = toEncoding . getLast
1676+ toEncoding = toEncoding1
1646 {-# INLINE toEncoding #-}
1677 {-# INLINE toEncoding #-}
1679+instance FromJSON1 Last where
1680+ liftParseJSON p = fmap Last . liftParseJSON p
1681+ {-# INLINE liftParseJSON #-}
1648instance FromJSON a => FromJSON (Last a) where
1683instance FromJSON a => FromJSON (Last a) where
1649− parseJSON = fmap Last . parseJSON
1684+ parseJSON = parseJSON1
1650 {-# INLINE parseJSON #-}
1685 {-# INLINE parseJSON #-}
1652instance ToJSON Version where
1688instance ToJSON Version where
1653 toJSON = toJSON . showVersion
1689 toJSON = toJSON . showVersion
1654 {-# INLINE toJSON #-}
1690 {-# INLINE toJSON #-}