on master help sign in
Merge pull request #479 from niteria/specialize-common
47a3a2cAdam Bergmark
Data/Aeson/Types/ToJSON.hs+9
@@ -615,6 +615,11 @@ instance ToJSON1 [] where
615 {-# INLINE liftToEncoding #-}
615 {-# INLINE liftToEncoding #-}
616
616
617instance (ToJSON a) => ToJSON [a] where
617instance (ToJSON a) => ToJSON [a] where
618+ {-# SPECIALIZE instance ToJSON String #-}
619+ {-# SPECIALIZE instance ToJSON [String] #-}
620+ {-# SPECIALIZE instance ToJSON [Array] #-}
621+ {-# SPECIALIZE instance ToJSON [Object] #-}
622+
618 toJSON = toJSON1
623 toJSON = toJSON1
619 {-# INLINE toJSON #-}
624 {-# INLINE toJSON #-}
620
625
@@ -1865,6 +1870,8 @@ instance ToJSON1 Vector where
1865 {-# INLINE liftToEncoding #-}
1870 {-# INLINE liftToEncoding #-}
1866
1871
1867instance (ToJSON a) => ToJSON (Vector a) where
1872instance (ToJSON a) => ToJSON (Vector a) where
1873+ {-# SPECIALIZE instance ToJSON Array #-}
1874+
1868 toJSON = toJSON1
1875 toJSON = toJSON1
1869 {-# INLINE toJSON #-}
1876 {-# INLINE toJSON #-}
1870
1877
@@ -1936,6 +1943,8 @@ instance ToJSONKey k => ToJSON1 (H.HashMap k) where
1936 {-# INLINE liftToEncoding #-}
1943 {-# INLINE liftToEncoding #-}
1937
1944
1938instance (ToJSON v, ToJSONKey k) => ToJSON (H.HashMap k v) where
1945instance (ToJSON v, ToJSONKey k) => ToJSON (H.HashMap k v) where
1946+ {-# SPECIALIZE instance ToJSON Object #-}
1947+
1939 toJSON = toJSON1
1948 toJSON = toJSON1
1940 {-# INLINE toJSON #-}
1949 {-# INLINE toJSON #-}
1941
1950