commutative-semigroups-0.1.0.2: Commutative semigroups
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.Product.Commutative

Synopsis

Documentation

class Num a => CommutativeProduct a Source #

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).

Since: 0.1.0

Instances

Instances details
CommutativeProduct Int16 Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Int32 Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Int64 Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Int8 Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Word16 Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Word32 Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Word64 Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Word8 Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Integer Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Natural Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Double Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Float Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Int Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct Word Source # 
Instance details

Defined in Numeric.Product.Commutative

(RealFloat a, CommutativeProduct a) => CommutativeProduct (Complex a) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct a => CommutativeProduct (Identity a) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct a => CommutativeProduct (Down a) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct a => CommutativeProduct (Max a) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct a => CommutativeProduct (Min a) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct a => CommutativeProduct (Product a) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct a => CommutativeProduct (Sum a) Source # 
Instance details

Defined in Numeric.Product.Commutative

(Integral a, CommutativeProduct a) => CommutativeProduct (Ratio a) Source # 
Instance details

Defined in Numeric.Product.Commutative

(HasResolution a, CommutativeProduct a) => CommutativeProduct (Fixed a) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct a => CommutativeProduct (Op a b) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct a => CommutativeProduct (Const a b) Source # 
Instance details

Defined in Numeric.Product.Commutative

CommutativeProduct (f a) => CommutativeProduct (Alt f a) Source # 
Instance details

Defined in Numeric.Product.Commutative