Safe Haskell | None |
---|---|
Language | Haskell2010 |
Monoid properties
You will need TypeApplications
to use these.
Synopsis
- monoidSpecOnValid :: forall a. (Show a, Eq a, Monoid a, Typeable a, GenValid a) => Spec
- monoidSpec :: forall a. (Show a, Eq a, Monoid a, Typeable a, GenUnchecked a) => Spec
- monoidSpecOnArbitrary :: forall a. (Show a, Eq a, Monoid a, Typeable a, Arbitrary a) => Spec
- monoidSpecOnGen :: forall a. (Show a, Eq a, Monoid a, Typeable a) => Gen a -> String -> (a -> [a]) -> Spec
Documentation
monoidSpecOnValid :: forall a. (Show a, Eq a, Monoid a, Typeable a, GenValid a) => Spec Source #
Standard test spec for properties of Monoid
instances for valid values
Example usage:
monoidSpecOnValid @[Double]
monoidSpec :: forall a. (Show a, Eq a, Monoid a, Typeable a, GenUnchecked a) => Spec Source #
Standard test spec for properties of Monoid
instances for unchecked values
Example usage:
monoidSpec @[Int]
monoidSpecOnArbitrary :: forall a. (Show a, Eq a, Monoid a, Typeable a, Arbitrary a) => Spec Source #
Standard test spec for properties of Monoid
instances for arbitrary values
Example usage:
monoidSpecOnArbitrary @[Int]
monoidSpecOnGen :: forall a. (Show a, Eq a, Monoid a, Typeable a) => Gen a -> String -> (a -> [a]) -> Spec Source #
Standard test spec for properties of Monoid instances for values generated by a given generator (and name for that generator).
Example usage:
monoidSpecOnGen (pure "a") "singleton list of 'a'"