packages feed

extensible-effects-concurrent 0.10.0 → 0.11.1

raw patch · 5 files changed

+18/−10 lines, 5 files

Files

ChangeLog.md view
@@ -1,5 +1,14 @@ # Changelog for extensible-effects-concurrent +## 0.11.1++- Fix a compilation error++## 0.11.0++- Change the return type of `spawnCallbackObserver` from+  `Bool` to `ApiServerCmd`+ ## 0.10.0  - Re-introduce a Logs Effect but keep the LogWriter Reader
examples/example-2/Main.hs view
@@ -43,7 +43,7 @@   (\fromSvr msg -> do     me <- self px     logInfo (show me ++ " observed on: " ++ show fromSvr ++ ": " ++ show msg)-    return True+    return HandleNextRequest   )  counterHandler
extensible-effects-concurrent.cabal view
@@ -1,5 +1,5 @@ name:           extensible-effects-concurrent-version:        0.10.0+version:        0.11.1 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/Api/Observer.hs view
@@ -188,17 +188,13 @@      , HasCallStack      )   => SchedulerProxy q-  -> (Server o -> Observation o -> Eff (Process q ': q) Bool)+  -> (Server o -> Observation o -> Eff (Process q ': q) ApiServerCmd)   -> Eff r (Server (CallbackObserver o)) spawnCallbackObserver px onObserve = spawnServerWithEffects   px   (castHandler handleCastCbo)   id- where-  handleCastCbo (CbObserved fromSvr v) = do-    continueObservation <- onObserve fromSvr v-    return-      (if continueObservation then HandleNextRequest else StopApiServer Nothing)+  where handleCastCbo (CbObserved fromSvr v) = onObserve fromSvr v  -- | Start a new process for an 'Observer' that schedules -- all observations to an effectful callback.@@ -218,4 +214,6 @@   -> Eff r (Server (CallbackObserver o)) spawnLoggingObserver px = spawnCallbackObserver   px-  (\s o -> logDebug (show s ++ " OBSERVED: " ++ show o) >> return True)+  (\s o ->+    logDebug (show s ++ " OBSERVED: " ++ show o) >> return HandleNextRequest+  )
src/Control/Eff/Concurrent/Api/Observer/Queue.hs view
@@ -19,6 +19,7 @@ import           Control.Eff.Concurrent.Api import           Control.Eff.Concurrent.Api.Client import           Control.Eff.Concurrent.Api.Observer+import           Control.Eff.Concurrent.Api.Server import           Control.Eff.Reader.Strict import           Control.Exception import           Control.Monad.IO.Class@@ -154,7 +155,7 @@                     (show from)             )           liftIO (atomically (writeTBQueue q observation))-          return True+          return HandleNextRequest         )       logDebug         (printf "%s started observer process %s"