reducers-3.10.3.1: Semigroups, specialized containers and a general map/reduce framework

Safe HaskellTrustworthy
LanguageHaskell98

Data.Semigroup.Union

Contents

Synopsis

Documentation

Unions of Containers

class HasUnion f where Source

A Container suitable for the Union Monoid

Methods

union :: f -> f -> f Source

Instances

HasUnion IntSet 
Eq a => HasUnion [a] 
HasUnion (IntMap a) 
Ord a => HasUnion (Set a) 
(Eq a, Hashable a) => HasUnion (HashSet a) 
Ord k => HasUnion (Map k a) 
(Eq k, Hashable k) => HasUnion (HashMap k a) 

class HasUnion f => HasUnion0 f where Source

Methods

empty :: f Source

Instances

HasUnion0 IntSet 
Eq a => HasUnion0 [a] 
HasUnion0 (IntMap a) 
Ord a => HasUnion0 (Set a) 
(Eq a, Hashable a) => HasUnion0 (HashSet a) 
Ord k => HasUnion0 (Map k a) 
(Eq k, Hashable k) => HasUnion0 (HashMap k a) 

newtype Union f Source

Constructors

Union 

Fields

getUnion :: f
 

Unions of Containers of Semigroups

class Functor f => HasUnionWith f where Source

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

Methods

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

Instances

class HasUnionWith f => HasUnionWith0 f where Source

Methods

emptyWith :: f a Source

newtype UnionWith f m Source

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

Constructors

UnionWith 

Fields

getUnionWith :: f m
 

Instances