Commits

Michael Snoyman committed 7c8ba8b

Allow aeson 0.3 to work with deepseq 1.2

Comments (0)

Files changed (2)

Data/Aeson/Types.hs

              deriving (Eq, Show, Typeable, Data)
 
 instance NFData Value where
-    rnf (Object o) = rnf o
+    rnf (Object o) = obj_rnf o
     rnf (Array a)  = V.foldl' (\x y -> rnf y `seq` x) () a
     rnf (String s) = rnf s
     rnf (Number n) = case n of I i -> rnf i; D d -> rnf d
     rnf (Bool b)   = rnf b
     rnf Null       = ()
 
+obj_rnf :: (NFData k, NFData v) => Map k v -> ()
+#if MIN_VERSION_containers(0,4,2)
+obj_rnf = rnf
+#else
+obj_rnf = rnf . M.toList
+#endif
+
 instance IsString Value where
     fromString = String . pack
     {-# INLINE fromString #-}
 name:            aeson
-version:         0.3.2.11
+version:         0.3.2.13
 license:         BSD3
 license-file:    LICENSE
 category:        Text, Web, JSON
     blaze-textual >= 0.2.0.2,
     bytestring,
     containers,
-    deepseq < 1.2,
+    deepseq,
     hashable >= 1.1.2.0,
     mtl,
     old-locale,