packages feed

servant-jsonrpc-server 2.0.0 → 2.1.0

raw patch · 3 files changed

+27/−6 lines, 3 filesdep ~aesondep ~basedep ~servant

Dependency ranges changed: aeson, base, servant, servant-jsonrpc, servant-server

Files

changelog.md view
@@ -1,3 +1,10 @@+# 2.1.0++* Relax upper version bounds for `aeson` to `(>= 1.3 && < 1.6)`+* Relax upper version bounds for `base` to `(>= 4.11 && < 5.0)`+* Relax upper version bounds for `servant` to `(>= 0.14 && < 0.19)`+* Relax upper version bounds for `servant-server` to `(>= 0.14 && < 0.19)`+ # 2.0.0  The previous version was hopelessly broken.  This completely replaces it.
servant-jsonrpc-server.cabal view
@@ -1,7 +1,7 @@ cabal-version:       2.4  name:                servant-jsonrpc-server-version:             2.0.0+version:             2.1.0 author:              Ian Shipman <ics@gambolingpangolin.com> maintainer:          Ian Shipman <ics@gambolingpangolin.com> @@ -30,10 +30,10 @@     Servant.Server.JsonRpc    build-depends:-      aeson                 >= 1.3          && < 1.5-    , base                  >= 4.11         && < 4.13+      aeson                 >= 1.3          && < 1.6+    , base                  >= 4.11         && < 5.0     , containers            >= 0.5          && < 0.7     , mtl                   >= 2.2          && < 2.3-    , servant               >= 0.14         && < 0.17-    , servant-jsonrpc       >= 1.0.1        && < 1.1-    , servant-server        >= 0.14         && < 0.17+    , servant               >= 0.14         && < 0.19+    , servant-jsonrpc       >= 1.0.1        && < 1.2+    , servant-server        >= 0.14         && < 0.19
src/Servant/Server/JsonRpc.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP                   #-} {-# LANGUAGE DataKinds             #-} {-# LANGUAGE FlexibleContexts      #-} {-# LANGUAGE FlexibleInstances     #-}@@ -9,6 +10,10 @@ {-# LANGUAGE TypeFamilies          #-} {-# LANGUAGE TypeOperators         #-} +#if MIN_VERSION_servant_server(0,18,0)+{-# LANGUAGE UndecidableInstances  #-}+#endif+ {-# OPTIONS_GHC -fno-warn-orphans #-}  -- |@@ -45,7 +50,12 @@ import           Servant.API              ((:<|>) (..), (:>), JSON,                                            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)+#elif MIN_VERSION_servant_server(0,14,0) import           Servant.Server           (Handler, HasServer (..))+#endif  import           Servant.JsonRpc @@ -69,7 +79,11 @@    :> Post '[JSON] PossibleJsonRpcResponse  +#if MIN_VERSION_servant_server(0,18,0)+instance (RouteJsonRpc api, HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters) => HasServer (RawJsonRpc api) context where+#elif MIN_VERSION_servant_server(0,14,0) instance RouteJsonRpc api => HasServer (RawJsonRpc api) context where+#endif     type ServerT (RawJsonRpc api) m = RpcHandler api m     route _ cx = route endpoint cx . fmap (serveJsonRpc pxa pxh)         where