Permalink
Browse files

Bump version

  • Loading branch information...
1 parent ca20520 commit 86433ea31cb25e041b0b565c17be5a1002fe9795 @bos committed Apr 13, 2011
Showing with 6 additions and 3 deletions.
  1. +1 −1 aeson.cabal
  2. +5 −2 tests/Properties.hs
View
@@ -1,5 +1,5 @@
name: aeson
-version: 0.3.2.3
+version: 0.3.2.4
license: BSD3
license-file: LICENSE
category: Text, Web, JSON
View
@@ -1,4 +1,4 @@
-{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
import Data.Aeson.Encode
import Data.Aeson.Parser (value)
@@ -11,7 +11,10 @@ import Test.QuickCheck.Monadic (assert, monadicIO, run)
import qualified Data.ByteString.Lazy.Char8 as L
import qualified Data.Attoparsec.Lazy as L
-encodeDouble d = encode (Number (D d)) == L.pack (show d)
+encodeDouble num denom
+ | isInfinite d || isNaN d = encode (Number (D d)) == "null"
+ | otherwise = encode (Number (D d)) == L.pack (show d)
+ where d = num / denom
encodeInteger i = encode (Number (I i)) == L.pack (show i)
roundTrip :: (Eq a, FromJSON a, ToJSON a) => a -> Bool

0 comments on commit 86433ea

Please sign in to comment.