packages feed

json2 0.8.1 → 0.8.2

raw patch · 4 files changed

+16/−11 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.JSON2.Pretty: pstring :: Pretty a => a -> String
- Data.JSON2.Pretty: pprint :: Pretty a => a -> IO ()
+ Data.JSON2.Pretty: pprint :: Pretty a => a -> String

Files

json2.cabal view
@@ -1,5 +1,5 @@ Name:                json2-Version:             0.8.1+Version:             0.8.2 Synopsis:            Library provides support for JSON.  Category:            Data, Text, JSON Description:         This library provides support for JSON.
src/Data/JSON2.hs view
@@ -109,10 +109,10 @@ import Data.Set (Set) import qualified Data.Set as Set -import qualified Data.ByteString           as B (ByteString)-import qualified Data.ByteString.Lazy      as L(ByteString)-import qualified Data.ByteString.UTF8      as U8 (fromString, toString) -import qualified Data.ByteString.Lazy.UTF8 as LU8 (fromString, toString) +import qualified Data.ByteString           as B   (ByteString)+import qualified Data.ByteString.Lazy      as L   (ByteString)+import qualified Data.ByteString.UTF8      as U8  (fromString, toString)+import qualified Data.ByteString.Lazy.UTF8 as LU8 (fromString, toString)  infixl 4 += infixr 6 .=
src/Data/JSON2/Internal.hs view
@@ -4,6 +4,7 @@   , checkBoundsIntegral   , checkBoundsEnum   , checkInfinite+--  , checkRead   , ConvError(ConvError)   , mkError   , mkError'@@ -54,8 +55,15 @@        then            return res        else-           mkError' ("Value conveversion to infinity. ")  x +           mkError' "Value conveversion to infinity. "  x +-- | Read whith check.+checkRead :: (Read a, Typeable a) => (ReadS a) -> String -> ConvResult a+checkRead r s = do+     let res = r s+     case res of+       [(x, "")] -> return x+       _         -> mkError' "Read error" s  -- Error Handling 
src/Data/JSON2/Pretty.hs view
@@ -16,11 +16,8 @@     pp :: a -> Doc     pp = text . show -    pstring :: a -> String-    pstring = render . pp--    pprint :: a -> IO ()-    pprint = putStrLn . pstring+    pprint :: a -> String+    pprint = render . pp  -- Instances