| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Numeric.Product.Commutative
Synopsis
- class Num a => CommutativeProduct a
Documentation
class Num a => CommutativeProduct a #
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.Quaterionfrom the- linearpackage has a- Numinstance, and quaternion multiplication is noncommutative.
- Data.Matrix.Matrixfrom the- matrixpackage 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