property-0.0.1: common properties

Safe HaskellSafe
LanguageHaskell2010

Test.Property.Operation.Neutral

Synopsis

Documentation

neutral :: Eq r => (r -> r -> r) -> r -> r -> Bool Source #

\( \forall a: (u \# a) \equiv a \)

Right neutrality of a unit u with respect to an operator #.

For example, an implementation of Monoid must satisfy neutral (<>) mempty

neutral' :: Eq r => (r -> r -> r) -> r -> r -> Bool Source #

\( \forall a: (a \# u) \equiv a \)

Left neutrality of a unit u with respect to an operator #.

For example, an implementation of Monoid must satisfy neutral (<>) mempty

neutral_on :: Rel r -> (r -> r -> r) -> r -> r -> Bool Source #

neutral_on' :: Rel r -> (r -> r -> r) -> r -> r -> Bool Source #