monoids-0.2.0.4: Monoids, specialized containers and a general map/reduce framework

Data.Monoid.Union

Contents

Synopsis

Documentation

Unions of Containers

class HasUnion f whereSource

A Container suitable for the Union Monoid

Methods

empty :: fSource

union :: f -> f -> fSource

Instances

HasUnion IntSet 
Eq a => HasUnion [a] 
HasUnion (IntMap a) 
Ord a => HasUnion (Set a) 
Ord k => HasUnion (Map k a) 

newtype Union f Source

Constructors

Union 

Fields

getUnion :: f
 

Instances

Functor Union 
HasUnion f => Reducer f (Union f) 
Eq f => Eq (Union f) 
Ord f => Ord (Union f) 
Read f => Read (Union f) 
Show f => Show (Union f) 
HasUnion f => Monoid (Union f) 

Unions of Containers of Monoids

class Functor f => HasUnionWith f whereSource

Polymorphic containers that we can supply an operation to handle unions with

Methods

unionWith :: (a -> a -> a) -> f a -> f a -> f aSource

emptyWith :: f aSource

Instances

newtype UnionWith f m Source

The Monoid ('unionWith mappend',empty) for containers full of monoids.

Constructors

UnionWith 

Fields

getUnionWith :: f m
 

Instances

Monad f => Monad (UnionWith f) 
Functor f => Functor (UnionWith f) 
(HasUnionWith f, Monoid m) => Reducer (f m) (UnionWith f m) 
Eq (f m) => Eq (UnionWith f m) 
Ord (f m) => Ord (UnionWith f m) 
Read (f m) => Read (UnionWith f m) 
Show (f m) => Show (UnionWith f m) 
(HasUnionWith f, Monoid m) => Monoid (UnionWith f m)