Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
Synopsis
- foldMap :: forall t m a. (Foldable t, Monoid m) => (a -> IO m) -> t a -> IO m
- foldMapWithKey :: Monoid m => (k -> a -> IO m) -> Map k a -> IO m
- newtype CmfException = CmfException [SomeException]
Folds
foldMap :: forall t m a. (Foldable t, Monoid m) => (a -> IO m) -> t a -> IO m Source #
A concurrent monoidal fold over some Foldable
.
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 Source #
A concurrent monoidal fold (with keys) over a Map
.
This operation may fail with:
CmfException
if any of the threads throws an exception.
Exception Type
newtype CmfException Source #
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.
Instances
Show CmfException Source # | |
Defined in Cmf showsPrec :: Int -> CmfException -> ShowS # show :: CmfException -> String # showList :: [CmfException] -> ShowS # | |
Generic CmfException Source # | |
Defined in Cmf type Rep CmfException :: Type -> Type # from :: CmfException -> Rep CmfException x # to :: Rep CmfException x -> CmfException # | |
Exception CmfException Source # | |
Defined in Cmf | |
type Rep CmfException Source # | |
Defined in Cmf type Rep CmfException = D1 (MetaData "CmfException" "Cmf" "cmf-0.1-4UrlJMAq50QEzgyp2sUP9B" True) (C1 (MetaCons "CmfException" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [SomeException]))) |