json-rpc 0.6.1.0 → 0.6.2.0
raw patch · 5 files changed
+18/−16 lines, 5 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Network.JsonRpc.Arbitrary: instance Arbitrary ErrorObj
- Network.JsonRpc.Arbitrary: instance Arbitrary Id
- Network.JsonRpc.Arbitrary: instance Arbitrary Message
- Network.JsonRpc.Arbitrary: instance Arbitrary Request
- Network.JsonRpc.Arbitrary: instance Arbitrary Response
- Network.JsonRpc.Arbitrary: instance Arbitrary Text
- Network.JsonRpc.Arbitrary: instance Arbitrary Value
- Network.JsonRpc.Arbitrary: instance Arbitrary Ver
Files
- Network/JsonRpc.hs +1/−0
- Network/JsonRpc/Arbitrary.hs +9/−8
- Network/JsonRpc/Interface.hs +4/−3
- json-rpc.cabal +4/−4
- test/Network/JsonRpc/Tests.hs +0/−1
Network/JsonRpc.hs view
@@ -8,6 +8,7 @@ import Network.JsonRpc.Interface import Network.JsonRpc.Data+import Network.JsonRpc.Arbitrary() -- $introduction --
Network/JsonRpc/Arbitrary.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-}--- | Arbitrary instances and data types for use in test suites. module Network.JsonRpc.Arbitrary where import Control.Applicative@@ -8,7 +7,7 @@ import qualified Data.HashMap.Strict as M import Data.Text (Text) import qualified Data.Text as T-import Network.JsonRpc+import Network.JsonRpc.Data import Test.QuickCheck.Arbitrary import Test.QuickCheck.Gen @@ -48,12 +47,14 @@ arbitrary = oneof [IdInt <$> arbitrary, IdTxt <$> arbitrary] instance Arbitrary Value where- arbitrary = resize 10 $ oneof [val, lsn, objn] where- val = oneof [ toJSON <$> (arbitrary :: Gen String)- , toJSON <$> (arbitrary :: Gen Int)- , toJSON <$> (arbitrary :: Gen Double)- , toJSON <$> (arbitrary :: Gen Bool)- ]+ arbitrary = resize 10 $ oneof [nonull, lsn, objn] where+ nonull = oneof+ [ toJSON <$> (arbitrary :: Gen String)+ , toJSON <$> (arbitrary :: Gen Int)+ , toJSON <$> (arbitrary :: Gen Double)+ , toJSON <$> (arbitrary :: Gen Bool)+ ]+ val = oneof [ nonull, return Null ] ls = toJSON <$> listOf val obj = toJSON . M.fromList <$> listOf ps ps = (,) <$> (arbitrary :: Gen String) <*> oneof [val, ls]
Network/JsonRpc/Interface.hs view
@@ -276,9 +276,10 @@ withAsync (outSrc $$ snk) $ \o -> withAsync (runReaderT processIncoming qs) $ const $ do a <- runReaderT f qs- liftIO . atomically . closeTBMChan $ outCh qs- _ <- liftIO $ wait o- return a+ liftIO $ do+ atomically . closeTBMChan $ outCh qs+ _ <- wait o+ return a cr :: Monad m => Conduit ByteString m ByteString
json-rpc.cabal view
@@ -1,5 +1,5 @@ name: json-rpc-version: 0.6.1.0+version: 0.6.2.0 synopsis: Fully-featured JSON-RPC 2.0 library description: This JSON-RPC library is fully-compatible with JSON-RPC 2.0 and 1.0. It@@ -24,13 +24,13 @@ source-repository this type: git location: https://github.com/xenog/json-rpc.git- tag: 0.6.1.0+ tag: 0.6.2.0 library- exposed-modules: Network.JsonRpc,- Network.JsonRpc.Arbitrary+ exposed-modules: Network.JsonRpc other-modules: Network.JsonRpc.Data, Network.JsonRpc.Interface+ Network.JsonRpc.Arbitrary build-depends: base >= 4.6 && < 5, aeson >= 0.7 && < 0.10, attoparsec >= 0.11,
test/Network/JsonRpc/Tests.hs view
@@ -17,7 +17,6 @@ import Data.Aeson.Types import Data.Maybe import Network.JsonRpc-import Network.JsonRpc.Arbitrary() import Test.QuickCheck import Test.QuickCheck.Monadic import Test.Framework