monoids-0.1.36: Monoids, specialized containers and a general map/reduce frameworkSource codeContentsIndex
Data.Monoid.Union
Contents
Unions of Containers
Unions of Containers of Monoids
Synopsis
module Data.Monoid.Reducer
class HasUnion f where
empty :: f
union :: f -> f -> f
empty :: HasUnion f => f
union :: HasUnion f => f -> f -> f
newtype Union f = Union {
getUnion :: f
}
class Functor f => HasUnionWith f where
unionWith :: (a -> a -> a) -> f a -> f a -> f a
emptyWith :: f a
emptyWith :: HasUnionWith f => f a
unionWith :: HasUnionWith f => (a -> a -> a) -> f a -> f a -> f a
newtype UnionWith f m = UnionWith {
getUnionWith :: f m
}
Documentation
module Data.Monoid.Reducer
Unions of Containers
class HasUnion f whereSource
A Container suitable for the Union Monoid
Methods
empty :: fSource
union :: f -> f -> fSource
show/hide Instances
empty :: HasUnion f => fSource
union :: HasUnion f => f -> f -> fSource
newtype Union f Source
The Monoid (union,empty)
Constructors
Union
getUnion :: f
show/hide Instances
Functor Union
Pointed Union
Copointed 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
show/hide Instances
emptyWith :: HasUnionWith f => f aSource
unionWith :: HasUnionWith f => (a -> a -> a) -> f a -> f a -> f aSource
newtype UnionWith f m Source
The Monoid ('unionWith mappend',empty) for containers full of monoids.
Constructors
UnionWith
getUnionWith :: f m
show/hide Instances
(HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => RightModule r (UnionWith f r)
(HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => LeftModule r (UnionWith f r)
(HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => Module r (UnionWith f r)
Monad f => Monad (UnionWith f)
Functor f => Functor (UnionWith f)
Pointed f => Pointed (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)
Produced by Haddock version 2.3.0