on master help sign in
Allow aeson 0.3 to work with deepseq 1.2
commit01495c02ae6bf3ec8b0893e607a51d41ab5bc9ad authorMichael Snoyman <michael@snoyman.com> dateWed 30 Nov 2011, 11:05 (15 years ago) parent5def283
2 files changed+10−3
Data/Aeson/Types.hs+8−1 aeson.cabal+2−2
Data/Aeson/Types.hs+8−1
@@ -212,13 +212,20 @@ data Value = Object Object
212212 deriving (Eq, Show, Typeable, Data)
213213
214214instance NFData Value where
215− rnf (Object o) = rnf o
215+ rnf (Object o) = obj_rnf o
216216 rnf (Array a) = V.foldl' (\x y -> rnf y `seq` x) () a
217217 rnf (String s) = rnf s
218218 rnf (Number n) = case n of I i -> rnf i; D d -> rnf d
219219 rnf (Bool b) = rnf b
220220 rnf Null = ()
221221
222+obj_rnf :: (NFData k, NFData v) => Map k v -> ()
223+#if MIN_VERSION_containers(0,4,2)
224+obj_rnf = rnf
225+#else
226+obj_rnf = rnf . M.toList
227+#endif
228+
222229instance IsString Value where
223230 fromString = String . pack
224231 {-# INLINE fromString #-}
aeson.cabal+2−2
@@ -1,5 +1,5 @@
11name: aeson
2−version: 0.3.2.11
2+version: 0.3.2.13
33license: BSD3
44license-file: LICENSE
55category: Text, Web, JSON
@@ -121,7 +121,7 @@ library
121121 blaze-textual >= 0.2.0.2,
122122 bytestring,
123123 containers,
124− deepseq < 1.2,
124+ deepseq,
125125 hashable >= 1.1.2.0,
126126 mtl,
127127 old-locale,