-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Concurrent actions that may fail
--
@package conceit
@version 0.2.2.1
module Control.Concurrent.Conceit
-- | Conceit is very similar to Concurrently from the
-- async package, but it has an explicit error type e.
--
-- The Applicative instance runs two actions concurrently, waits
-- until they finish, and combines their results.
--
-- However, if any of the actions fails with e the other action
-- is immediately cancelled and the whole computation fails with
-- e.
--
-- To put it another way: Conceit behaves like
-- Concurrently for successes and like race for errors.
newtype Conceit e a
Conceit :: IO (Either e a) -> Conceit e a
runConceit :: Conceit e a -> IO (Either e a)
_Conceit :: IO a -> Conceit e a
_runConceit :: Conceit Void a -> IO a
conceit :: IO (Either e a) -> IO (Either e b) -> IO (Either e (a, b))
-- | Works similarly to mapConcurrently from the async
-- package, but if any of the computations fails with e, the
-- others are immediately cancelled and the whole computation fails with
-- e.
mapConceit :: Traversable t => (a -> IO (Either e b)) -> t a -> IO (Either e (t b))
instance Functor (Conceit e)
instance MonadCatch (Conceit e)
instance MonadThrow (Conceit e)
instance Apply (Conceit s)
instance Bind (Conceit s)
instance Plus (Conceit e)
instance Alt (Conceit e)
instance MonadIO (Conceit e)
instance MonadPlus (Conceit e)
instance Monad (Conceit e)
instance Monoid a => Monoid (Conceit e a)
instance Alternative (Conceit e)
instance Applicative (Conceit e)
instance Bifunctor Conceit