servant-jsonrpc-server 2.1.0 → 2.1.1
raw patch · 3 files changed
+18/−11 lines, 3 filesdep −mtldep ~aesondep ~servantdep ~servant-serverPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: mtl
Dependency ranges changed: aeson, servant, servant-server
API changes (from Hackage documentation)
- Servant.Server.JsonRpc: instance Data.Aeson.Types.ToJSON.ToJSON a => Servant.API.ContentTypes.AllCTRender '[Servant.API.ContentTypes.JSON] (Servant.Server.JsonRpc.PossibleContent a)
+ Servant.Server.JsonRpc: instance Data.Aeson.Types.ToJSON.ToJSON a => Servant.API.ContentTypes.AllCTRender '[Servant.JsonRpc.JSONRPC] (Servant.Server.JsonRpc.PossibleContent a)
Files
- changelog.md +5/−0
- servant-jsonrpc-server.cabal +4/−5
- src/Servant/Server/JsonRpc.hs +9/−6
changelog.md view
@@ -1,3 +1,8 @@+# 2.1.1++* Relax version bounds+* Remove dependency on `mtl`+ # 2.1.0 * Relax upper version bounds for `aeson` to `(>= 1.3 && < 1.6)`
servant-jsonrpc-server.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: servant-jsonrpc-server-version: 2.1.0+version: 2.1.1 author: Ian Shipman <ics@gambolingpangolin.com> maintainer: Ian Shipman <ics@gambolingpangolin.com> @@ -30,10 +30,9 @@ Servant.Server.JsonRpc build-depends:- aeson >= 1.3 && < 1.6+ aeson >= 1.3 && < 2.1 , base >= 4.11 && < 5.0 , containers >= 0.5 && < 0.7- , mtl >= 2.2 && < 2.3- , servant >= 0.14 && < 0.19+ , servant >= 0.14 && < 0.20 , servant-jsonrpc >= 1.0.1 && < 1.2- , servant-server >= 0.14 && < 0.19+ , servant-server >= 0.14 && < 0.20
src/Servant/Server/JsonRpc.hs view
@@ -47,12 +47,15 @@ import qualified Data.Map.Strict as Map import Data.Proxy (Proxy (..)) import GHC.TypeLits (KnownSymbol, symbolVal)-import Servant.API ((:<|>) (..), (:>), JSON,- NoContent (..), Post, ReqBody)+import Servant.API (NoContent (..), Post, ReqBody,+ (:<|>) (..), (:>)) import Servant.API.ContentTypes (AllCTRender (..)) #if MIN_VERSION_servant_server(0,18,0)-import Servant.Server (Handler, HasServer (..), HasContextEntry, type (.++), DefaultErrorFormatters, ErrorFormatters)+import Servant.Server (DefaultErrorFormatters,+ ErrorFormatters, Handler,+ HasContextEntry, HasServer (..),+ type (.++)) #elif MIN_VERSION_servant_server(0,14,0) import Servant.Server (Handler, HasServer (..)) #endif@@ -65,7 +68,7 @@ data PossibleContent a = SomeContent a | EmptyContent -instance ToJSON a => AllCTRender '[JSON] (PossibleContent a) where+instance ToJSON a => AllCTRender '[JSONRPC] (PossibleContent a) where handleAcceptH px h = \case SomeContent x -> handleAcceptH px h x EmptyContent -> handleAcceptH px h NoContent@@ -75,8 +78,8 @@ type RawJsonRpcEndpoint- = ReqBody '[JSON] (Request Value)- :> Post '[JSON] PossibleJsonRpcResponse+ = ReqBody '[JSONRPC] (Request Value)+ :> Post '[JSONRPC] PossibleJsonRpcResponse #if MIN_VERSION_servant_server(0,18,0)