numeric-prelude-0.4.3.2: An experimental alternative hierarchy of numeric type classes

Safe HaskellSafe
LanguageHaskell98

Algebra.Laws

Description

Define common properties that can be used e.g. for automated tests. Cf. to Test.QuickCheck.Utils.

Documentation

commutative :: Eq a => (b -> b -> a) -> b -> b -> Bool Source #

associative :: Eq a => (a -> a -> a) -> a -> a -> a -> Bool Source #

leftIdentity :: Eq a => (b -> a -> a) -> b -> a -> Bool Source #

rightIdentity :: Eq a => (a -> b -> a) -> b -> a -> Bool Source #

identity :: Eq a => (a -> a -> a) -> a -> a -> Bool Source #

leftZero :: Eq a => (a -> a -> a) -> a -> a -> Bool Source #

rightZero :: Eq a => (a -> a -> a) -> a -> a -> Bool Source #

zero :: Eq a => (a -> a -> a) -> a -> a -> Bool Source #

leftInverse :: Eq a => (b -> b -> a) -> (b -> b) -> a -> b -> Bool Source #

rightInverse :: Eq a => (b -> b -> a) -> (b -> b) -> a -> b -> Bool Source #

inverse :: Eq a => (b -> b -> a) -> (b -> b) -> a -> b -> Bool Source #

leftDistributive :: Eq a => (a -> b -> a) -> (a -> a -> a) -> b -> a -> a -> Bool Source #

rightDistributive :: Eq a => (b -> a -> a) -> (a -> a -> a) -> b -> a -> a -> Bool Source #

homomorphism :: Eq a => (b -> a) -> (b -> b -> b) -> (a -> a -> a) -> b -> b -> Bool Source #

rightCascade :: Eq a => (b -> b -> b) -> (a -> b -> a) -> a -> b -> b -> Bool Source #

leftCascade :: Eq a => (b -> b -> b) -> (b -> a -> a) -> a -> b -> b -> Bool Source #