Control-Monad-MultiPass-0.1.0.0: A Library for Writing Multi-Pass Algorithms.

Safe HaskellSafe

Control.Monad.MultiPass.ThreadContext.MonoidTC

Description

MonoidTC defines a thread context which is used to gather values from all the threads of the program. The values to be gathered must be instances of the Monoid class.

Synopsis

Documentation

newtype MonoidTC a Source

MonoidTC is a thread context which uses the Monoid interface to combine the values from multiple threads. Instances of the Monoid class are expected to be associative, so the value computed by MonoidTC is invariant under changes to the number of threads that are spawned.

Constructors

MonoidTC 

Fields

unwrapMonoidTC :: a
 

Instances

Monoid a => NextThreadContext r w tc gc (MonoidTC a) 
Monoid a => ThreadContext r w (MonoidTC a) 
Monoid a => Instrument tc (MonoidTC a) () (Monoid2 a r w On Off tc) 
Monoid a => Monoid (MonoidTC a)