Safe Haskell | Safe-Inferred |
---|
Documentation
A monad transformer for processing the results of the bag sequencially.
In addition to the actions available in the base monad, which has to be
an instance of MonadIO in all functions, it provides the action
getResult
to get a result of the bag.
BagT | |
|
getResult :: MonadIO m => BagT r m (Maybe r)Source
Get a result of the bag if there is one. If it returns Nothing, all tasks
have been processed and there are no results left. getResults
blocks
until a task has been evaluated to a result or all tasks are processed.
Therefore it may block forever.
getAllResults :: MonadIO m => BagT a m [a]Source
Convenience function to get all results from the bag of tasks.