packages feed

extensible-effects-concurrent 0.24.2 → 0.24.3

raw patch · 5 files changed

+26/−6 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Eff.Concurrent.Protocol.EffectfulServer: embedReplySerializer :: EmbedProtocol outer inner => Serializer (Reply outer reply) -> Serializer (Reply inner reply)
+ Control.Eff.Concurrent.Protocol.EffectfulServer: toEmbeddedOrigin :: EmbedProtocol outer inner => RequestOrigin outer reply -> RequestOrigin inner reply
+ Control.Eff.Concurrent.Protocol.Request: toEmbeddedOrigin :: EmbedProtocol outer inner => RequestOrigin outer reply -> RequestOrigin inner reply
+ Control.Eff.Concurrent.Protocol.StatefulServer: embedReplySerializer :: EmbedProtocol outer inner => Serializer (Reply outer reply) -> Serializer (Reply inner reply)
+ Control.Eff.Concurrent.Protocol.StatefulServer: toEmbeddedOrigin :: EmbedProtocol outer inner => RequestOrigin outer reply -> RequestOrigin inner reply

Files

ChangeLog.md view
@@ -1,5 +1,8 @@ # Changelog for extensible-effects-concurrent +## 0.24.3+- Add `EmbedProtocol` related function `toEmbeddedOrigin`+     ## 0.24.2 - Add more `EmbedProtocol` related functions:     - `embedReplySerializer`
extensible-effects-concurrent.cabal view
@@ -1,6 +1,6 @@ cabal-version:  2.0 name:           extensible-effects-concurrent-version:        0.24.2+version:        0.24.3 description:    Please see the README on GitHub at <https://github.com/sheyll/extensible-effects-concurrent#readme> synopsis:       Message passing concurrency as extensible-effect homepage:       https://github.com/sheyll/extensible-effects-concurrent#readme
src/Control/Eff/Concurrent/Protocol/EffectfulServer.hs view
@@ -16,6 +16,8 @@   , RequestOrigin(..)   , Reply(..)   , sendReply+  , toEmbeddedOrigin+  , embedReplySerializer   )   where 
src/Control/Eff/Concurrent/Protocol/Request.hs view
@@ -6,6 +6,7 @@   , sendReply   , RequestOrigin(..)   , embedRequestOrigin+  , toEmbeddedOrigin   , Reply(..)   , embedReplySerializer   , makeRequestOrigin@@ -96,7 +97,8 @@ -- -- The reply will be deeply evaluated to 'rnf'. ----- To send replies for 'EmbedProtocol' instances use 'embedReplySerializer'.+-- To send replies for 'EmbedProtocol' instances use 'embedReplySerializer'+-- and 'toEmbeddedOrigin'. -- -- @since 0.15.0 sendReply ::@@ -104,9 +106,7 @@   => Serializer (Reply protocol reply) -> RequestOrigin protocol reply -> reply -> Eff eff () sendReply ser o r = sendAnyMessage (_requestOriginPid o) $! runSerializer ser $! Reply o r --- | Turn an /embedded/ 'RequestOrigin' to a 'RequestOrigin' for the /bigger/ request.------ This function is strict in all parameters.+-- | Turn an 'RequestOrigin' to an origin for an embedded request (See 'EmbedProtocol'). -- -- This is useful of a server delegates the @calls@ and @casts@ for an embedded protocol -- to functions, that require the 'Serializer' and 'RequestOrigin' in order to call@@ -114,6 +114,19 @@ -- -- See also 'embedReplySerializer'. --+-- @since 0.24.3+toEmbeddedOrigin+  :: EmbedProtocol outer inner+  => RequestOrigin outer reply+  -> RequestOrigin inner reply+toEmbeddedOrigin (RequestOrigin !pid !ref) = RequestOrigin pid ref++-- | Turn an /embedded/ 'RequestOrigin' to a 'RequestOrigin' for the /bigger/ request.+--+-- This is the inverse of 'toEmbeddedOrigin'.+--+-- This function is strict in all parameters.+-- -- @since 0.24.2 embedRequestOrigin :: EmbedProtocol outer inner => RequestOrigin inner reply -> RequestOrigin outer reply embedRequestOrigin (RequestOrigin !pid !ref) = RequestOrigin pid ref@@ -125,7 +138,7 @@ -- to functions, that require the 'Serializer' and 'RequestOrigin' in order to call -- 'sendReply'. ----- See also 'embedRequestOrigin'.+-- See also 'toEmbeddedOrigin'. -- -- @since 0.24.2 embedReplySerializer :: EmbedProtocol outer inner => Serializer (Reply outer reply) -> Serializer (Reply inner reply)
src/Control/Eff/Concurrent/Protocol/StatefulServer.hs view
@@ -22,6 +22,8 @@   , RequestOrigin(..)   , Reply(..)   , sendReply+  , toEmbeddedOrigin+  , embedReplySerializer   )   where