on master help sign in
Use toAscList for Sets to guarantee stable ordering
1aa35aaJeremy Fitzhardinge
Data/Aeson/Types.hs+1−1
@@ -518,7 +518,7 @@ instance (FromJSON a) => FromJSON (Vector a) where
518 {-# INLINE parseJSON #-}
518 {-# INLINE parseJSON #-}
519
519
520instance (ToJSON a) => ToJSON (Set.Set a) where
520instance (ToJSON a) => ToJSON (Set.Set a) where
521− toJSON = toJSON . Set.toList
521+ toJSON = toJSON . Set.toAscList
522 {-# INLINE toJSON #-}
522 {-# INLINE toJSON #-}
523
523
524instance (Ord a, FromJSON a) => FromJSON (Set.Set a) where
524instance (Ord a, FromJSON a) => FromJSON (Set.Set a) where