on master help sign in
only provide json instances for array,smallarray,etc. when building against base >= 4.7
2d77af0Andrew Martin
Data/Aeson/Types/FromJSON.hs+2
@@ -1687,6 +1687,7 @@ instance FromJSON DotNetTime where
1687-- primitive
1687-- primitive
1688-------------------------------------------------------------------------------
1688-------------------------------------------------------------------------------
1689
1689
1690+#if (MIN_VERSION_base(0,4,7))
1690instance FromJSON a => FromJSON (PM.Array a) where
1691instance FromJSON a => FromJSON (PM.Array a) where
1691 -- note: we could do better than this if vector exposed the data
1692 -- note: we could do better than this if vector exposed the data
1692 -- constructor in Data.Vector.
1693 -- constructor in Data.Vector.
@@ -1702,6 +1703,7 @@ instance (PM.Prim a,FromJSON a) => FromJSON (PM.PrimArray a) where
1702instance (PM.PrimUnlifted a,FromJSON a) => FromJSON (PM.UnliftedArray a) where
1703instance (PM.PrimUnlifted a,FromJSON a) => FromJSON (PM.UnliftedArray a) where
1703 parseJSON = fmap Exts.fromList . parseJSON
1704 parseJSON = fmap Exts.fromList . parseJSON
1704#endif
1705#endif
1706+#endif
1705
1707
1706-------------------------------------------------------------------------------
1708-------------------------------------------------------------------------------
1707-- time
1709-- time
Data/Aeson/Types/ToJSON.hs+2
@@ -1918,6 +1918,7 @@ formatMillis = take 3 . formatTime defaultTimeLocale "%q"
1918-- primitive
1918-- primitive
1919-------------------------------------------------------------------------------
1919-------------------------------------------------------------------------------
1920
1920
1921+#if (MIN_VERSION_base(0,4,7))
1921instance ToJSON a => ToJSON (PM.Array a) where
1922instance ToJSON a => ToJSON (PM.Array a) where
1922 -- note: we could do better than this if vector exposed the data
1923 -- note: we could do better than this if vector exposed the data
1923 -- constructor in Data.Vector.
1924 -- constructor in Data.Vector.
@@ -1937,6 +1938,7 @@ instance (PM.PrimUnlifted a,ToJSON a) => ToJSON (PM.UnliftedArray a) where
1937 toJSON = toJSON . Exts.toList
1938 toJSON = toJSON . Exts.toList
1938 toEncoding = toEncoding . Exts.toList
1939 toEncoding = toEncoding . Exts.toList
1939#endif
1940#endif
1941+#endif
1940
1942
1941-------------------------------------------------------------------------------
1943-------------------------------------------------------------------------------
1942-- time
1944-- time