-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Commutative semigroups
--   
--   A commutative semigroup is a semigroup where the order of arguments to
--   mappend does not matter.
@package commutative-semigroups
@version 0.2.0.2

module Numeric.Product.Commutative

-- | Subclass of Num where (*) is commutative.
--   
--   Num doesn't demand commutative (*), and there are
--   reasonable "real-world" instances with non-commutative multiplication.
--   There is also no canonical subclass in base that would
--   suffice, as both Integral and Floating imply commutative
--   (*) for different reasons.
--   
--   Two examples of non-commutative (*):
--   
--   
--   
- Linear.Quaternion.Quaterion from the linear
--   package has a Num instance, and quaternion multiplication is
--   noncommutative.
--   
- Data.Matrix.Matrix from the matrix package uses
--   (*) for matrix multiplication, which is also non-commutative
--   (on square matrices, which is the only time the question makes
--   sense).
--   
class Num a => CommutativeProduct a
instance Numeric.Product.Commutative.CommutativeProduct (f a) => Numeric.Product.Commutative.CommutativeProduct (GHC.Internal.Data.Semigroup.Internal.Alt f a)
instance (GHC.Internal.Float.RealFloat a, Numeric.Product.Commutative.CommutativeProduct a) => Numeric.Product.Commutative.CommutativeProduct (Data.Complex.Complex a)
instance Numeric.Product.Commutative.CommutativeProduct a => Numeric.Product.Commutative.CommutativeProduct (GHC.Internal.Data.Functor.Const.Const a b)
instance Numeric.Product.Commutative.CommutativeProduct GHC.Types.Double
instance Numeric.Product.Commutative.CommutativeProduct a => Numeric.Product.Commutative.CommutativeProduct (GHC.Internal.Data.Ord.Down a)
instance (Data.Fixed.HasResolution a, Numeric.Product.Commutative.CommutativeProduct a) => Numeric.Product.Commutative.CommutativeProduct (Data.Fixed.Fixed a)
instance Numeric.Product.Commutative.CommutativeProduct GHC.Types.Float
instance Numeric.Product.Commutative.CommutativeProduct a => Numeric.Product.Commutative.CommutativeProduct (GHC.Internal.Data.Functor.Identity.Identity a)
instance Numeric.Product.Commutative.CommutativeProduct GHC.Types.Int
instance Numeric.Product.Commutative.CommutativeProduct GHC.Internal.Int.Int16
instance Numeric.Product.Commutative.CommutativeProduct GHC.Internal.Int.Int32
instance Numeric.Product.Commutative.CommutativeProduct GHC.Internal.Int.Int64
instance Numeric.Product.Commutative.CommutativeProduct GHC.Internal.Int.Int8
instance Numeric.Product.Commutative.CommutativeProduct GHC.Num.Integer.Integer
instance Numeric.Product.Commutative.CommutativeProduct a => Numeric.Product.Commutative.CommutativeProduct (Data.Semigroup.Max a)
instance Numeric.Product.Commutative.CommutativeProduct a => Numeric.Product.Commutative.CommutativeProduct (Data.Semigroup.Min a)
instance Numeric.Product.Commutative.CommutativeProduct GHC.Num.Natural.Natural
instance Numeric.Product.Commutative.CommutativeProduct a => Numeric.Product.Commutative.CommutativeProduct (Data.Functor.Contravariant.Op a b)
instance Numeric.Product.Commutative.CommutativeProduct a => Numeric.Product.Commutative.CommutativeProduct (GHC.Internal.Data.Semigroup.Internal.Product a)
instance (GHC.Internal.Real.Integral a, Numeric.Product.Commutative.CommutativeProduct a) => Numeric.Product.Commutative.CommutativeProduct (GHC.Internal.Real.Ratio a)
instance Numeric.Product.Commutative.CommutativeProduct a => Numeric.Product.Commutative.CommutativeProduct (GHC.Internal.Data.Semigroup.Internal.Sum a)
instance Numeric.Product.Commutative.CommutativeProduct GHC.Types.Word
instance Numeric.Product.Commutative.CommutativeProduct GHC.Internal.Word.Word16
instance Numeric.Product.Commutative.CommutativeProduct GHC.Internal.Word.Word32
instance Numeric.Product.Commutative.CommutativeProduct GHC.Internal.Word.Word64
instance Numeric.Product.Commutative.CommutativeProduct GHC.Internal.Word.Word8

module Data.Semigroup.Commutative

-- | A Commutative semigroup is a Semigroup that follows the
--   rule:
--   
--   
--   a <> b == b <> a
--   
class Semigroup g => Commutative g
instance (Data.Semigroup.Commutative.Commutative (f a), Data.Semigroup.Commutative.Commutative (g a)) => Data.Semigroup.Commutative.Commutative ((GHC.Internal.Generics.:*:) f g a)
instance Data.Semigroup.Commutative.Commutative (f (g a)) => Data.Semigroup.Commutative.Commutative ((GHC.Internal.Generics.:.:) f g a)
instance Data.Semigroup.Commutative.Commutative GHC.Internal.Data.Semigroup.Internal.All
instance Data.Semigroup.Commutative.Commutative GHC.Internal.Data.Semigroup.Internal.Any
instance Data.Semigroup.Commutative.Commutative a => Data.Semigroup.Commutative.Commutative (GHC.Internal.Data.Functor.Const.Const a x)
instance Data.Semigroup.Commutative.Commutative a => Data.Semigroup.Commutative.Commutative (GHC.Internal.Data.Ord.Down a)
instance Data.Semigroup.Commutative.Commutative a => Data.Semigroup.Commutative.Commutative (GHC.Internal.Data.Semigroup.Internal.Dual a)
instance Data.Semigroup.Commutative.Commutative b => Data.Semigroup.Commutative.Commutative (a -> b)
instance Data.Semigroup.Commutative.Commutative a => Data.Semigroup.Commutative.Commutative (GHC.Internal.Data.Functor.Identity.Identity a)
instance Data.Semigroup.Commutative.Commutative Data.IntSet.Internal.IntSet
instance GHC.Classes.Ord a => Data.Semigroup.Commutative.Commutative (Data.Semigroup.Max a)
instance Data.Semigroup.Commutative.Commutative a => Data.Semigroup.Commutative.Commutative (GHC.Internal.Maybe.Maybe a)
instance GHC.Classes.Ord a => Data.Semigroup.Commutative.Commutative (Data.Semigroup.Min a)
instance Data.Semigroup.Commutative.Commutative a => Data.Semigroup.Commutative.Commutative (Data.Functor.Contravariant.Op a b)
instance Numeric.Product.Commutative.CommutativeProduct a => Data.Semigroup.Commutative.Commutative (GHC.Internal.Data.Semigroup.Internal.Product a)
instance Data.Semigroup.Commutative.Commutative (GHC.Internal.Data.Proxy.Proxy x)
instance GHC.Classes.Ord a => Data.Semigroup.Commutative.Commutative (Data.Set.Internal.Set a)
instance GHC.Internal.Num.Num a => Data.Semigroup.Commutative.Commutative (GHC.Internal.Data.Semigroup.Internal.Sum a)
instance (Data.Semigroup.Commutative.Commutative a, Data.Semigroup.Commutative.Commutative b) => Data.Semigroup.Commutative.Commutative (a, b)
instance (Data.Semigroup.Commutative.Commutative a, Data.Semigroup.Commutative.Commutative b, Data.Semigroup.Commutative.Commutative c) => Data.Semigroup.Commutative.Commutative (a, b, c)
instance (Data.Semigroup.Commutative.Commutative a, Data.Semigroup.Commutative.Commutative b, Data.Semigroup.Commutative.Commutative c, Data.Semigroup.Commutative.Commutative d) => Data.Semigroup.Commutative.Commutative (a, b, c, d)
instance (Data.Semigroup.Commutative.Commutative a, Data.Semigroup.Commutative.Commutative b, Data.Semigroup.Commutative.Commutative c, Data.Semigroup.Commutative.Commutative d, Data.Semigroup.Commutative.Commutative e) => Data.Semigroup.Commutative.Commutative (a, b, c, d, e)
instance Data.Semigroup.Commutative.Commutative ()
instance Data.Semigroup.Commutative.Commutative GHC.Internal.Base.Void
instance (Data.Semigroup.Commutative.Commutative a, GHC.Internal.Base.Monoid a) => Data.Semigroup.Commutative.Commutative (Data.Semigroup.WrappedMonoid a)
