
Data.Monoid  Portability  portable  Stability  experimental  Maintainer  libraries@haskell.org 



Description 
The Monoid class with various generalpurpose instances.
Inspired by the paper
Functional Programming with Overloading and
HigherOrder Polymorphism,
Mark P Jones (http://www.cse.ogi.edu/~mpj/)
Advanced School of Functional Programming, 1995.


Synopsis 



Documentation 

class Monoid a where 
The monoid class.
A minimal complete definition must supply mempty and mappend,
and these should satisfy the monoid laws.
  Methods  mempty :: a  Identity of mappend
  mappend :: a > a > a  An associative operation
  mconcat :: [a] > a  Fold a list using the monoid.
For most types, the default definition for mconcat will be
used, but the function is included in the class definition so
that an optimized version can be provided for specific types.

  Instances  Monoid All  Monoid Any  Monoid ByteString  Monoid ByteString  Monoid IntSet  Monoid Ordering  Monoid ()  (Monoid a, Monoid b) => Monoid (a, b)  (Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)  (Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)  (Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)  Monoid b => Monoid (a > b)  Monoid a => Monoid (Dual a)  Monoid (Endo a)  Monoid (IntMap a)  Num a => Monoid (Product a)  Monoid (Seq a)  Ord a => Monoid (Set a)  Num a => Monoid (Sum a)  Monoid [a]  Ord k => Monoid (Map k v) 



newtype Dual a 
The dual of a monoid, obtained by swapping the arguments of mappend.
 Constructors   Instances  


newtype Endo a 
The monoid of endomorphisms under composition.
 Constructors   Instances  


newtype All 
Boolean monoid under conjunction.
 Constructors   Instances  


newtype Any 
Boolean monoid under disjunction.
 Constructors   Instances  


newtype Sum a 
Monoid under addition.
 Constructors   Instances  


newtype Product a 
Monoid under multiplication.
 Constructors   Instances  


Produced by Haddock version 0.8 