packages feed

http2-grpc-proto-lens 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+30/−20 lines, 3 filesdep ~basedep ~bytestringdep ~proto-lenssetup-changed

Dependency ranges changed: base, bytestring, proto-lens

Files

Setup.hs view
@@ -1,2 +1,3 @@ import Distribution.Simple+ main = defaultMain
http2-grpc-proto-lens.cabal view
@@ -1,13 +1,7 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.2.------ see: https://github.com/sol/hpack------ hash: 55c756b55c80ecf8c0e187e1f0b8ec7ff8d54ad1ad8f84a823599f9c2ea01582- name:           http2-grpc-proto-lens-version:        0.1.0.0+version:        0.1.1.0 synopsis:       Encoders based on `proto-lens` for gRPC over HTTP2. description:    Please see the README on GitHub at <https://github.com/haskell-grpc-native/http2-grpc-haskell/blob/master/http2-grpc-proto-lens/README.md> category:       Network@@ -36,11 +30,11 @@       src   ghc-options: -Wall   build-depends:-      base >=4.11 && <5+      base >=4.10 && <5     , binary >=0.8.5 && <0.11-    , bytestring >=0.10.8 && <0.11+    , bytestring >=0.10.8 && <0.12     , case-insensitive >=1.2.0 && <1.3     , http2-grpc-types-    , proto-lens >=0.5 && <0.7+    , proto-lens >=0.5 && <0.8     , zlib >=0.6.2 && <0.7   default-language: Haskell2010
src/Network/GRPC/HTTP2/ProtoLens.hs view
@@ -1,26 +1,41 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-}-{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE UndecidableInstances #-}  module Network.GRPC.HTTP2.ProtoLens where -import           Data.Binary.Builder (fromByteString, singleton, putWord32be)-import           Data.Binary.Get (getByteString, getInt8, getWord32be, runGetIncremental)+import Data.Binary.Builder (fromByteString, putWord32be, singleton)+import Data.Binary.Get (getByteString, getInt8, getWord32be, runGetIncremental) import qualified Data.ByteString.Char8 as ByteString-import           Data.ProtoLens.Encoding (encodeMessage, decodeMessage)-import           Data.ProtoLens.Message (Message)-import           Data.ProtoLens.Service.Types (Service(..), HasMethod, HasMethodImpl(..))-import           Data.Proxy (Proxy(..))-import           GHC.TypeLits (Symbol, symbolVal)+#if MIN_VERSION_base(4,11,0)+import Data.Kind (Type)+#else+#endif+import Data.ProtoLens.Encoding (decodeMessage, encodeMessage)+import Data.ProtoLens.Message (Message)+import Data.ProtoLens.Service.Types (HasMethod, HasMethodImpl (..), Service (..))+import Data.Proxy (Proxy (..))+import GHC.TypeLits (Symbol, symbolVal) -import Network.GRPC.HTTP2.Types+#if MIN_VERSION_base(4,11,0)+#else+import Data.Monoid ((<>))+#endif+ import Network.GRPC.HTTP2.Encoding+import Network.GRPC.HTTP2.Types  -- | A proxy type for giving static information about RPCs.+#if MIN_VERSION_base(4,11,0)+data RPC (s :: Type) (m :: Symbol) = RPC+#else data RPC (s :: *) (m :: Symbol) = RPC+#endif  instance (Service s, HasMethod s m) => IsRPC (RPC s m) where   path rpc = "/" <> pkg rpc Proxy <> "." <> srv rpc Proxy <> "/" <> meth rpc Proxy