on master help sign in
Bump version
af1306bBryan O'Sullivan
aeson.cabal+1−1
@@ -1,5 +1,5 @@
1name: aeson
1name: aeson
2−version: 0.3.2.3
2+version: 0.3.2.4
3license: BSD3
3license: BSD3
4license-file: LICENSE
4license-file: LICENSE
5category: Text, Web, JSON
5category: Text, Web, JSON
tests/Properties.hs+5−2
@@ -1,4 +1,4 @@
1−{-# LANGUAGE ScopedTypeVariables #-}
1+{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
2
2
3import Data.Aeson.Encode
3import Data.Aeson.Encode
4import Data.Aeson.Parser (value)
4import Data.Aeson.Parser (value)
@@ -11,7 +11,10 @@ import Test.QuickCheck.Monadic (assert, monadicIO, run)
11import qualified Data.ByteString.Lazy.Char8 as L
11import qualified Data.ByteString.Lazy.Char8 as L
12import qualified Data.Attoparsec.Lazy as L
12import qualified Data.Attoparsec.Lazy as L
13
13
14+encodeDouble num denom
15+ | isInfinite d || isNaN d = encode (Number (D d)) == "null"
14−encodeDouble d = encode (Number (D d)) == L.pack (show d)
16+ | otherwise = encode (Number (D d)) == L.pack (show d)
17+ where d = num / denom
15encodeInteger i = encode (Number (I i)) == L.pack (show i)
18encodeInteger i = encode (Number (I i)) == L.pack (show i)
16
19
17roundTrip :: (Eq a, FromJSON a, ToJSON a) => a -> Bool
20roundTrip :: (Eq a, FromJSON a, ToJSON a) => a -> Bool