cmf-0.1: (C)oncurrent (M)onoidal (F)olds

Safe HaskellNone
LanguageHaskell2010

Cmf

Contents

Description

This module provides many concurrent monoidal folds for commutative monoids.

Some notes (applies to all folds):

  1. This module is intended to be imported qualified to avoid name clashing.
  2. Accumulation is strict.
  3. Exceptions that occur will accumulate into a CmfException and be re-thrown.
Synopsis

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:

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:

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.

Constructors

CmfException [SomeException] 
Instances
Show CmfException Source # 
Instance details

Defined in Cmf

Generic CmfException Source # 
Instance details

Defined in Cmf

Associated Types

type Rep CmfException :: Type -> Type #

Exception CmfException Source # 
Instance details

Defined in Cmf

type Rep CmfException Source # 
Instance details

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])))