servant-jsonrpc-client 1.0.0 → 1.0.1
raw patch · 4 files changed
+45/−5 lines, 4 filesdep ~servant-jsonrpcPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: servant-jsonrpc
API changes (from Hackage documentation)
+ Servant.Client.JsonRpc: instance (Servant.Client.Core.RunClient.RunClient m, Servant.Client.Core.HasClient.HasClient m api) => Servant.Client.Core.HasClient.HasClient m (Servant.JsonRpc.RawJsonRpc api)
Files
- LICENSE +28/−0
- changelog.md +4/−0
- servant-jsonrpc-client.cabal +6/−5
- src/Servant/Client/JsonRpc.hs +7/−0
+ LICENSE view
@@ -0,0 +1,28 @@+Copyright 2020 Bitnomial, Inc.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are+met:++1. Redistributions of source code must retain the above copyright+notice, this list of conditions and the following disclaimer.++2. Redistributions in binary form must reproduce the above copyright+notice, this list of conditions and the following disclaimer in the+documentation and/or other materials provided with the distribution.++3. Neither the name of the copyright holder nor the names of its+contributors may be used to endorse or promote products derived from+this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
changelog.md view
@@ -1,3 +1,7 @@+# 1.0.1++Adds a `HasClient` instance for `RawJsonRpc`+ # 1.0.0 First release
servant-jsonrpc-client.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: servant-jsonrpc-client-version: 1.0.0+version: 1.0.1 author: Ian Shipman <ics@gambolingpangolin.com> maintainer: Ian Shipman <ics@gambolingpangolin.com> @@ -10,8 +10,9 @@ Use this package to generate servant client functions that interact with a remote server via JSON-RPC over HTTP. -homepage: https://github.com/GambolingPangolin/servant-jsonrpc-license: ISC+homepage: https://github.com/bitnomial/servant-jsonrpc+license: BSD-3-Clause+license-file: LICENSE category: Web build-type: Simple @@ -19,7 +20,7 @@ source-repository head type: git- location: https://github.com/GambolingPangolin/servant-jsonrpc.git+ location: https://github.com/bitnomial/servant-jsonrpc.git library default-language: Haskell2010@@ -33,4 +34,4 @@ , base >= 4.11 && < 4.13 , servant >= 0.14 && < 0.17 , servant-client-core >= 0.14 && < 0.17- , servant-jsonrpc >= 1.0 && < 1.1+ , servant-jsonrpc >= 1.0.1 && < 1.1
src/Servant/Client/JsonRpc.hs view
@@ -30,6 +30,13 @@ import Servant.JsonRpc +-- | The 'RawJsonRpc' construct is completely transparent to clients+instance (RunClient m, HasClient m api) => HasClient m (RawJsonRpc api) where+ type Client m (RawJsonRpc api) = Client m api+ clientWithRoute pxm _ = clientWithRoute pxm (Proxy @api)+ hoistClientMonad pxm _ = hoistClientMonad pxm (Proxy @api)++ instance (RunClient m, KnownSymbol method, ToJSON p, FromJSON e, FromJSON r) => HasClient m (JsonRpc method p e r) where