riak 1.1.2.1 → 1.1.2.2
raw patch · 12 files changed
+84/−84 lines, 12 filesdep ~riak-protobufPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: riak-protobuf
API changes (from Hackage documentation)
- Network.Riak.JSON: json :: (FromJSON a, ToJSON a) => a -> JSON a
+ Network.Riak.JSON: json :: a -> JSON a
Files
- Changes.md +2/−0
- riak.cabal +61/−62
- src/Network/Riak/Connection/Internal.hs +3/−3
- src/Network/Riak/Content.hs +1/−1
- src/Network/Riak/JSON.hs +4/−2
- src/Network/Riak/Request.hs +1/−1
- src/Network/Riak/Resolvable/Internal.hs +1/−1
- src/Network/Riak/Response.hs +4/−7
- src/Network/Riak/Types/Internal.hs +0/−1
- tests/Internal.hs +4/−1
- tests/Test.hs +0/−1
- tests/Utils.hs +3/−4
Changes.md view
@@ -1,3 +1,5 @@+* 1.1.2.2+ - Fix for GHC 8.2.2 support * 1.1.2.1 - PR #90. Add GHC 8.2.1 support - Bump time upper bound from <1.7 to <1.9
riak.cabal view
@@ -1,5 +1,5 @@ name: riak-version: 1.1.2.1+version: 1.1.2.2 synopsis: A Haskell client for the Riak decentralized data store description: A Haskell client library for the Riak decentralized data@@ -42,8 +42,8 @@ category: Network build-type: Simple extra-source-files:- README.markdown- Changes.md+ README.markdown+ Changes.md cabal-version: >=1.8 @@ -67,37 +67,37 @@ library hs-source-dirs: src exposed-modules:- Network.Riak- Network.Riak.Basic- Network.Riak.Cluster- Network.Riak.Connection- Network.Riak.Connection.Internal- Network.Riak.Connection.Pool- Network.Riak.Content- Network.Riak.CRDT- Network.Riak.CRDT.Ops- Network.Riak.CRDT.Request- Network.Riak.CRDT.Response- Network.Riak.CRDT.Riak- Network.Riak.CRDT.Types- Network.Riak.Debug- Network.Riak.Escape- Network.Riak.Functions- Network.Riak.JSON- Network.Riak.JSON.Resolvable- Network.Riak.Request- Network.Riak.Resolvable- Network.Riak.Response- Network.Riak.Search- Network.Riak.Types- Network.Riak.Value- Network.Riak.Value.Resolvable- Network.Riak.Types.Internal+ Network.Riak+ Network.Riak.Basic+ Network.Riak.Cluster+ Network.Riak.Connection+ Network.Riak.Connection.Internal+ Network.Riak.Connection.Pool+ Network.Riak.Content+ Network.Riak.CRDT+ Network.Riak.CRDT.Ops+ Network.Riak.CRDT.Request+ Network.Riak.CRDT.Response+ Network.Riak.CRDT.Riak+ Network.Riak.CRDT.Types+ Network.Riak.Debug+ Network.Riak.Escape+ Network.Riak.Functions+ Network.Riak.JSON+ Network.Riak.JSON.Resolvable+ Network.Riak.Request+ Network.Riak.Resolvable+ Network.Riak.Response+ Network.Riak.Search+ Network.Riak.Types+ Network.Riak.Value+ Network.Riak.Value.Resolvable+ Network.Riak.Types.Internal other-modules:- Network.Riak.Connection.NoPush- Network.Riak.Resolvable.Internal- Network.Riak.Tag+ Network.Riak.Connection.NoPush+ Network.Riak.Resolvable.Internal+ Network.Riak.Tag build-depends: aeson >= 0.8 && < 1.3,@@ -123,7 +123,7 @@ protocol-buffers >= 2.1.4 && < 2.5, pureMD5, random,- riak-protobuf == 0.22.*,+ riak-protobuf == 0.23.*, semigroups >= 0.16, stm == 2.4.*, text == 1.2.*,@@ -152,40 +152,39 @@ cpp-options: -DTEST2I other-modules:- CRDTProperties- Internal- Utils- Network.Riak.Admin.DSL- Properties+ CRDTProperties+ Internal+ Utils+ Network.Riak.Admin.DSL+ Properties build-depends:- base,- riak,- riak-protobuf,- aeson,- bytestring,- containers,- HUnit,- process,- QuickCheck,- tasty,- tasty-hunit,- tasty-quickcheck,- template-haskell,- text,- mtl >= 2.1,- semigroups >= 0.16,- data-default-class >= 0.0.1,- yaml >= 0.8.19-+ base,+ riak,+ riak-protobuf,+ aeson,+ bytestring,+ containers,+ HUnit,+ process,+ QuickCheck,+ tasty,+ tasty-hunit,+ tasty-quickcheck,+ template-haskell,+ text,+ mtl >= 2.1,+ semigroups >= 0.16,+ data-default-class >= 0.0.1,+ yaml >= 0.8.19 benchmark bench type: exitcode-stdio-1.0 hs-source-dirs: benchmarks main-is: Main.hs build-depends:- base,- riak,- criterion >= 1.1,- bytestring >= 0.10,- semigroups >= 0.16+ base,+ riak,+ criterion >= 1.1,+ bytestring >= 0.10,+ semigroups >= 0.16
src/Network/Riak/Connection/Internal.hs view
@@ -109,7 +109,7 @@ onIOException "connect" $ bracketOnError (socket (addrFamily ai) (addrSocketType ai) (addrProtocol ai))- sClose $+ close $ \sock -> do Socket.connect sock (addrAddress ai) buf <- newIORef L.empty@@ -122,7 +122,7 @@ disconnect Connection{..} = onIOException "disconnect" $ do debug "disconnect" $ "server " ++ host connClient ++ ":" ++ port connClient ++ ", client ID " ++ L.unpack (clientID connClient)- sClose connSock+ close connSock writeIORef connBuffer L.empty -- | We use a larger receive buffer than we usually need, and@@ -291,7 +291,7 @@ {-# INLINE debugRecv #-} #endif -pipe :: (Request req, Show resp) =>+pipe :: (Request req) => (Connection -> IO resp) -> Connection -> [req] -> IO [resp] pipe _ _ [] = return [] pipe receive conn@Connection{..} reqs = do
src/Network/Riak/Content.hs view
@@ -22,7 +22,7 @@ , link ) where -import Data.Aeson.Encode (encode)+import Data.Aeson (encode) import Data.Aeson.Types (ToJSON) import Network.Riak.Protocol.Content (Content(..)) import Network.Riak.Types.Internal (Bucket, Key, Tag)
src/Network/Riak/JSON.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, CPP #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE CPP #-} -- | -- Module: Network.Riak.JSON@@ -44,7 +46,7 @@ -- | Wrap up a value so that it will be encoded and decoded as JSON -- when converted to/from 'Content'.-json :: (FromJSON a, ToJSON a) => a -> JSON a+json :: a -> JSON a json = J {-# INLINE json #-}
src/Network/Riak/Request.hs view
@@ -64,7 +64,7 @@ import Network.Riak.Protocol.ListBucketsRequest import Network.Riak.Protocol.MapReduceRequest import Network.Riak.Protocol.PingRequest-import Network.Riak.Types.Internal hiding (MessageTag(..),bucket,key)+import Network.Riak.Types.Internal hiding (MessageTag(..)) import Network.Riak.Escape (escape) import qualified Network.Riak.Protocol.DeleteRequest as Del import qualified Network.Riak.Protocol.Link as Link
src/Network/Riak/Resolvable/Internal.hs view
@@ -88,7 +88,7 @@ newtype ResolvableMonoid a = RM { unRM :: a } deriving (Eq, Ord, Read, Show, Typeable, Data, Monoid, FromJSON, ToJSON) -instance (Eq a, Show a, Monoid a) => Resolvable (ResolvableMonoid a) where+instance (Show a, Monoid a) => Resolvable (ResolvableMonoid a) where resolve = mappend {-# INLINE resolve #-}
src/Network/Riak/Response.hs view
@@ -30,6 +30,9 @@ #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ((<$>))+import Data.Semigroup+import Control.Arrow ((&&&))+import Control.Monad (join) #endif import Network.Riak.Escape (unescape) import Network.Riak.Protocol.BucketProps (BucketProps)@@ -47,15 +50,9 @@ import qualified Network.Riak.Protocol.Pair as Pair import qualified Data.ByteString.Lazy as L-import qualified Data.ByteString.Lazy.Char8 as LC import qualified Data.Sequence as Seq-import qualified Data.Map.Strict as M import Data.Maybe (fromMaybe)-import Data.Semigroup-import Control.Arrow ((&&&))-import Control.Monad (join)-import Data.Foldable (foldMap, toList)-import Text.Read (readMaybe)+import Data.Foldable (toList) getClientID :: GetClientIDResponse -> ClientID getClientID = client_id
src/Network/Riak/Types/Internal.hs view
@@ -61,7 +61,6 @@ import Data.Digest.Pure.MD5 (md5) import Data.Hashable (Hashable) import Data.IORef (IORef)-import Data.Map (Map) import Data.Sequence (Seq) import Data.Typeable (Typeable) import Data.Word (Word32)
tests/Internal.hs view
@@ -1,12 +1,14 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-}-+{-# LANGUAGE CPP #-} -- | GHC stage restriction: have to write Lift in a separate module from where -- TH is used (Utils.hs) module Internal where +#if __GLASGOW_HASKELL__ < 710 import Control.Applicative+#endif import Data.Aeson (FromJSON(parseJSON), genericParseJSON) import Data.Aeson.Types (defaultOptions, fieldLabelModifier) import Data.Char (toLower)@@ -27,3 +29,4 @@ parseJSON = genericParseJSON (defaultOptions { fieldLabelModifier = f }) where f ('c':'o':'n':'f':'i':'g':x:xs) = toLower x : xs+ f _ = fail "invalid config"
tests/Test.hs view
@@ -17,7 +17,6 @@ import Data.Foldable (toList) import Data.Semigroup import Data.Text (Text)-import Control.Applicative import Control.Concurrent (threadDelay) import Control.Exception import qualified Network.Riak as Riak
tests/Utils.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-}-+{-# LANGUAGE CPP #-} module Utils ( globalAdmin , globalHost@@ -11,7 +11,9 @@ , ShellFailure(..) ) where +#if __GLASGOW_HASKELL__ < 710 import Control.Applicative+#endif import Control.Exception import Control.Monad import Data.Typeable@@ -21,14 +23,11 @@ import System.IO.Unsafe (unsafePerformIO) import System.Timeout -import Control.Applicative import qualified Network.Riak as Riak import qualified Network.Riak.Basic as B import Network.Riak.Connection.Pool (Pool, create, withConnection)-import Network.Riak.Connection (defaultClient) import qualified System.Process as Process- config :: Config config = $$(decodeFile "tests/test.yaml")