- data HandlerSet m a b
- data HandlerID
- emptyHandlerSet :: Monad m => HandlerSet m a ()
- emptyHandlerSetWithSequencer :: (a -> [a -> m b] -> m b) -> HandlerSet m a b
- setHandlerSequencer :: (a -> [a -> m b] -> m b) -> HandlerSet m a b -> HandlerSet m a b
- addHandlerToSet :: (a -> m b) -> HandlerSet m a b -> (HandlerSet m a b, HandlerID)
- removeHandlerFromSet :: HandlerID -> HandlerSet m a b -> (HandlerSet m a b, Maybe (a -> m b))
- invokeHandlers :: Monad m => HandlerSet m a b -> a -> m b
A collection of handlers that can be fired in a batch. Consists of a collection of handlers and a sequencing rule that determines how multiple handlers are ordered and their results threaded or aggregated.
An opaque identifier for handlers, useful for removing them from a set later.
Create a new handler set with a simple default sequencer
Create a new handler set using the provided function to coordinate the dispatch of the handlers
Replace the handler sequencing rule in a
Add a handler to a set and return the updated set and the assigned
Attempt to remove a handler from a set (based on its
the modified set and the handler removed, if any.