summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlambda_foo <>2017-12-07 03:41:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-12-07 03:41:00 (GMT)
commit8f44fe876a5f328a08473bad5e108a184b6e1913 (patch)
treedc3792b33b400286d5c20a6b3b8d49d141631634
parent49936f08db63c65c610532e2845ca294c130c722 (diff)
version 1.1.2.21.1.2.2
-rw-r--r--Changes.md2
-rw-r--r--riak.cabal123
-rw-r--r--src/Network/Riak/Connection/Internal.hs6
-rw-r--r--src/Network/Riak/Content.hs2
-rw-r--r--src/Network/Riak/JSON.hs6
-rw-r--r--src/Network/Riak/Request.hs2
-rw-r--r--src/Network/Riak/Resolvable/Internal.hs2
-rw-r--r--src/Network/Riak/Response.hs11
-rw-r--r--src/Network/Riak/Types/Internal.hs1
-rw-r--r--tests/Internal.hs5
-rw-r--r--tests/Test.hs1
-rw-r--r--tests/Utils.hs7
12 files changed, 84 insertions, 84 deletions
diff --git a/Changes.md b/Changes.md
index 187f15f..fba00d7 100644
--- a/Changes.md
+++ b/Changes.md
@@ -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
diff --git a/riak.cabal b/riak.cabal
index 563d2f9..0773e90 100644
--- a/riak.cabal
+++ b/riak.cabal
@@ -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 @@ copyright: Copyright 2011 MailRank, Inc.
category: Network
build-type: Simple
extra-source-files:
- README.markdown
- Changes.md
+ README.markdown
+ Changes.md
cabal-version: >=1.8
@@ -67,37 +67,37 @@ flag test2i
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 @@ library
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 @@ test-suite test
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
diff --git a/src/Network/Riak/Connection/Internal.hs b/src/Network/Riak/Connection/Internal.hs
index 78f38c9..a193193 100644
--- a/src/Network/Riak/Connection/Internal.hs
+++ b/src/Network/Riak/Connection/Internal.hs
@@ -109,7 +109,7 @@ connect cli0 = do
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 -> IO ()
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 @@ debugRecv _ act = act
{-# 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
diff --git a/src/Network/Riak/Content.hs b/src/Network/Riak/Content.hs
index a6468f1..a60b5c0 100644
--- a/src/Network/Riak/Content.hs
+++ b/src/Network/Riak/Content.hs
@@ -22,7 +22,7 @@ module Network.Riak.Content
, 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)
diff --git a/src/Network/Riak/JSON.hs b/src/Network/Riak/JSON.hs
index e6ebd43..452f695 100644
--- a/src/Network/Riak/JSON.hs
+++ b/src/Network/Riak/JSON.hs
@@ -1,4 +1,6 @@
-{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, CPP #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE CPP #-}
-- |
-- Module: Network.Riak.JSON
@@ -44,7 +46,7 @@ newtype JSON a = J {
-- | 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 #-}
diff --git a/src/Network/Riak/Request.hs b/src/Network/Riak/Request.hs
index 05a34f2..e2eafa0 100644
--- a/src/Network/Riak/Request.hs
+++ b/src/Network/Riak/Request.hs
@@ -64,7 +64,7 @@ import Network.Riak.Protocol.GetServerInfoRequest
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
diff --git a/src/Network/Riak/Resolvable/Internal.hs b/src/Network/Riak/Resolvable/Internal.hs
index 7b3ab97..8f0fed6 100644
--- a/src/Network/Riak/Resolvable/Internal.hs
+++ b/src/Network/Riak/Resolvable/Internal.hs
@@ -88,7 +88,7 @@ class (Show a) => Resolvable a where
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 #-}
diff --git a/src/Network/Riak/Response.hs b/src/Network/Riak/Response.hs
index c780bcb..4211f77 100644
--- a/src/Network/Riak/Response.hs
+++ b/src/Network/Riak/Response.hs
@@ -30,6 +30,9 @@ module Network.Riak.Response
#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.Link as Link
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
diff --git a/src/Network/Riak/Types/Internal.hs b/src/Network/Riak/Types/Internal.hs
index 443c15b..4153324 100644
--- a/src/Network/Riak/Types/Internal.hs
+++ b/src/Network/Riak/Types/Internal.hs
@@ -61,7 +61,6 @@ import Data.ByteString.Lazy (ByteString)
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)
diff --git a/tests/Internal.hs b/tests/Internal.hs
index 8e5120f..1d85d40 100644
--- a/tests/Internal.hs
+++ b/tests/Internal.hs
@@ -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 @@ instance FromJSON Config where
parseJSON = genericParseJSON (defaultOptions { fieldLabelModifier = f })
where
f ('c':'o':'n':'f':'i':'g':x:xs) = toLower x : xs
+ f _ = fail "invalid config"
diff --git a/tests/Test.hs b/tests/Test.hs
index e84fb15..c31ea61 100644
--- a/tests/Test.hs
+++ b/tests/Test.hs
@@ -17,7 +17,6 @@ import Data.List.NonEmpty (NonEmpty(..))
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
diff --git a/tests/Utils.hs b/tests/Utils.hs
index 649aea6..6c82c77 100644
--- a/tests/Utils.hs
+++ b/tests/Utils.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
-
+{-# LANGUAGE CPP #-}
module Utils
( globalAdmin
, globalHost
@@ -11,7 +11,9 @@ module Utils
, ShellFailure(..)
) where
+#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
+#endif
import Control.Exception
import Control.Monad
import Data.Typeable
@@ -21,15 +23,12 @@ import System.Exit
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")