-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | (C)oncurrent (M)onoidal (F)olds
--
-- This package provides concurrent monoidal folds over various
-- structures. Because the folds are concurrent, the monoids are assumed
-- to be commutative.
@package cmf
@version 0.1
-- | This module provides many concurrent monoidal folds for commutative
-- monoids.
--
-- Some notes (applies to all folds):
--
--
-- - This module is intended to be imported qualified to avoid name
-- clashing.
-- - Accumulation is strict.
-- - Exceptions that occur will accumulate into a CmfException
-- and be re-thrown.
--
module Cmf
-- | A concurrent monoidal fold over some Foldable.
--
-- This operation may fail with:
--
--
-- - CmfException if any of the threads throws an
-- exception.
--
foldMap :: forall t m a. (Foldable t, Monoid m) => (a -> IO m) -> t a -> IO m
-- | A concurrent monoidal fold (with keys) over a Map.
--
-- This operation may fail with:
--
--
-- - CmfException if any of the threads throws an
-- exception.
--
foldMapWithKey :: Monoid m => (k -> a -> IO m) -> Map k a -> IO m
-- | An exception to be re-thrown by a fold in this module. It is just an
-- accumulation of all the exceptions that occurred among the running
-- threads.
newtype CmfException
CmfException :: [SomeException] -> CmfException
instance GHC.Exception.Type.Exception Cmf.CmfException
instance GHC.Generics.Generic Cmf.CmfException
instance GHC.Show.Show Cmf.CmfException