eventuo11y 0.3.0.0 → 0.3.1.0
raw patch · 4 files changed
+27/−11 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Observe.Event: causedEventBackend :: Monad m => Event m r s f -> EventBackend m r s
Files
- CHANGELOG.md +4/−0
- eventuo11y.cabal +2/−2
- src/Observe/Event.hs +10/−0
- src/Observe/Event/BackendModification.hs +11/−9
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for eventuo11y +## 0.3.1.0 -- 2022-10-04++Add causedEventBackend+ ## 0.3.0.0 -- 2022-10-03 Add single-modifier exports from BackendModification
eventuo11y.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: eventuo11y-version: 0.3.0.0+version: 0.3.1.0 synopsis: An event-oriented observability library description: Instrument your Haskell codebase with wide, semantically meaningful events.@@ -26,7 +26,7 @@ See "Observe.Event.Backend" for documentation on writing an @EventBackend@. - See [Example.hs](https://github.com/shlevy/eventuo11y/tree/v0.3.0.0/Example.hs) for an example.+ See [Example.hs](https://github.com/shlevy/eventuo11y/tree/v0.3.1.0/Example.hs) for an example. See [eventuo11y-batteries](https://hackage.haskell.org/package/eventuo11y-batteries) for miscellaneous framework-specific helpers.
src/Observe/Event.hs view
@@ -58,6 +58,7 @@ -- * 'EventBackend's EventBackend, subEventBackend,+ causedEventBackend, unitEventBackend, pairEventBackend, hoistEventBackend,@@ -323,3 +324,12 @@ Event m r s f -> EventBackend m r s subEventBackend Event {..} = modifyEventBackend (setAncestor $ referenceImpl impl) backend++-- | An 'EventBackend' where every otherwise causeless event will be marked+-- as caused by the given 'Event'.+causedEventBackend ::+ (Monad m) =>+ -- | The parent event.+ Event m r s f ->+ EventBackend m r s+causedEventBackend Event {..} = modifyEventBackend (setInitialCause $ referenceImpl impl) backend
src/Observe/Event/BackendModification.hs view
@@ -38,15 +38,17 @@ -- that appears in the type of our capabilities and ensure it's liftable to both our application monad and the -- capability's base instantiation. module Observe.Event.BackendModification- ( EventBackendModifier(..)- , EventBackendModifiers- , modifyEventBackend- , -- * Simple EventBackendModifiers- unmodified- , silence- , setAncestor- , setInitialCause- ) where+ ( EventBackendModifier (..),+ EventBackendModifiers,+ modifyEventBackend,++ -- * Simple EventBackendModifiers+ unmodified,+ silence,+ setAncestor,+ setInitialCause,+ )+where import Control.Category import Observe.Event.Backend