packages feed

mu-rpc 0.4.0.0 → 0.4.0.1

raw patch · 3 files changed

+18/−9 lines, 3 filesdep ~template-haskellPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: template-haskell

API changes (from Hackage documentation)

- Mu.Rpc.Examples: type QuickStartService = 'Package ('Just "helloworld") '[ 'Service "Greeter" '[ 'Method "SayHello" '[ 'ArgSingle ('Nothing @Symbol) ('SchemaRef QuickstartSchema "HelloRequest")] ('RetSingle ('SchemaRef QuickstartSchema "HelloResponse")), 'Method "SayHi" '[ 'ArgSingle ('Nothing @Symbol) ('SchemaRef QuickstartSchema "HiRequest")] ('RetStream ('SchemaRef QuickstartSchema "HelloResponse")), 'Method "SayManyHellos" '[ 'ArgStream ('Nothing @Symbol) ('SchemaRef QuickstartSchema "HelloRequest")] ('RetStream ('SchemaRef QuickstartSchema "HelloResponse"))]] :: Package'
+ Mu.Rpc.Examples: type QuickStartService = ('Package ('Just "helloworld") '[ 'Service "Greeter" '[ 'Method "SayHello" '[ 'ArgSingle ('Nothing :: Maybe Symbol) ('SchemaRef QuickstartSchema "HelloRequest")] ('RetSingle ('SchemaRef QuickstartSchema "HelloResponse")), 'Method "SayHi" '[ 'ArgSingle ('Nothing :: Maybe Symbol) ('SchemaRef QuickstartSchema "HiRequest")] ('RetStream ('SchemaRef QuickstartSchema "HelloResponse")), 'Method "SayManyHellos" '[ 'ArgStream ('Nothing :: Maybe Symbol) ('SchemaRef QuickstartSchema "HelloRequest")] ('RetStream ('SchemaRef QuickstartSchema "HelloResponse"))]] :: Package')

Files

mu-rpc.cabal view
@@ -1,5 +1,5 @@ name:               mu-rpc-version:            0.4.0.0+version:            0.4.0.1 synopsis:           Protocol-independent declaration of services and servers. description:   Protocol-independent declaration of services and servers for mu-haskell.@@ -35,7 +35,7 @@     , mtl               >=2.2   && <2.3     , mu-schema         ==0.3.*     , sop-core          >=0.5   && <0.6-    , template-haskell  >=2.14  && <2.16+    , template-haskell  >=2.14  && <2.17     , text              >=1.2   && <1.3     , wai               >=3.2   && <4 
src/Mu/Rpc/Examples.hs view
@@ -21,14 +21,14 @@ -} module Mu.Rpc.Examples where -import qualified Data.Aeson as J+import qualified Data.Aeson               as J import           Data.Conduit import           Data.Conduit.Combinators as C import qualified Data.Text                as T import           GHC.Generics import           GHC.TypeLits -import           Mu.Adapter.Json ()+import           Mu.Adapter.Json          () import           Mu.Rpc import           Mu.Schema import           Mu.Server@@ -46,17 +46,17 @@      ]  type QuickStartService-  = 'Package ('Just "helloworld")+  = ('Package ('Just "helloworld")       '[ 'Service "Greeter"         '[ 'Method "SayHello"-          '[ 'ArgSingle ('Nothing @Symbol) ('SchemaRef QuickstartSchema "HelloRequest") ]+          '[ 'ArgSingle ('Nothing :: Maybe Symbol) ('SchemaRef QuickstartSchema "HelloRequest") ]             ('RetSingle ('SchemaRef QuickstartSchema "HelloResponse"))         , 'Method "SayHi"-          '[ 'ArgSingle ('Nothing @Symbol) ('SchemaRef QuickstartSchema "HiRequest")]+          '[ 'ArgSingle ('Nothing :: Maybe Symbol) ('SchemaRef QuickstartSchema "HiRequest")]             ('RetStream ('SchemaRef QuickstartSchema "HelloResponse"))         , 'Method "SayManyHellos"-          '[ 'ArgStream ('Nothing @Symbol) ('SchemaRef QuickstartSchema "HelloRequest")]-                ('RetStream ('SchemaRef QuickstartSchema "HelloResponse")) ] ] :: Package'+          '[ 'ArgStream ('Nothing :: Maybe Symbol) ('SchemaRef QuickstartSchema "HelloRequest")]+                ('RetStream ('SchemaRef QuickstartSchema "HelloResponse")) ] ] :: Package')  newtype HelloRequest = HelloRequest { name :: T.Text }   deriving ( Show, Eq, Generic
src/Mu/Server.hs view
@@ -1,3 +1,4 @@+{-# language CPP                       #-} {-# language ConstraintKinds           #-} {-# language DataKinds                 #-} {-# language ExistentialQuantification #-}@@ -78,6 +79,10 @@ import           Mu.Rpc import           Mu.Schema +#if __GLASGOW_HASKELL__ < 880+import Unsafe.Coerce (unsafeCoerce)+#endif+ -- | Constraint for monads that can be used as servers type MonadServer m = (MonadError ServerError m, MonadIO m) -- | Simplest monad which satisfies 'MonadServer'.@@ -434,7 +439,11 @@                  -> ServicesT chn info ss m hs     wrapServices S0 = S0     wrapServices (h :<&>: rest)+#if __GLASGOW_HASKELL__ >= 880       = wrapHandlers h :<&>: wrapServices rest+#else+      = unsafeCoerce (wrapHandlers (unsafeCoerce h)) :<&>: unsafeCoerce (wrapServices rest)+#endif      wrapHandlers :: forall inh ms innerHs.                     HandlersT chn info inh ms m innerHs