Safe Haskell | None |
---|---|
Language | Haskell2010 |
- primProps :: (Prim a, Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)]
- storableProps :: (Storable a, Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)]
- semigroupProps :: (Semigroup a, Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)]
- monoidProps :: (Monoid a, Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)]
- showReadProps :: (Show a, Read a, Eq a, Arbitrary a) => Proxy a -> [(String, Property)]
- jsonProps :: (ToJSON a, FromJSON a, Show a, Arbitrary a, Eq a) => Proxy a -> [(String, Property)]
- eqProps :: (Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)]
- functorProps :: (Functor f, Eq1 f, Show1 f, Arbitrary1 f) => Proxy f -> [(String, Property)]
- applicativeProps :: (Applicative f, Eq1 f, Show1 f, Arbitrary1 f) => Proxy f -> [(String, Property)]
- monadProps :: (Monad f, Eq1 f, Show1 f, Arbitrary1 f) => Proxy f -> [(String, Property)]
Documentation
storableProps :: (Storable a, Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)] Source #
semigroupProps :: (Semigroup a, Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)] Source #
Tests the following properties:
- Associative
a <> (b <> c) ≡ (a <> b) <> c
monoidProps :: (Monoid a, Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)] Source #
Tests the following properties:
- Associative
mappend a (mappend b c) ≡ mappend (mappend a b) c
- Left Identity
mappend mempty a ≡ a
- Right Identity
mappend a mempty ≡ a
jsonProps :: (ToJSON a, FromJSON a, Show a, Arbitrary a, Eq a) => Proxy a -> [(String, Property)] Source #
eqProps :: (Eq a, Arbitrary a, Show a) => Proxy a -> [(String, Property)] Source #
Tests the following properties:
- Transitive
a == b ∧ b == c ⇒ a == c
- Symmetric
a == b ⇒ b == a
Some of these properties involve implication. In the case that the left hand side of the implication arrow does not hold, we do not retry. Consequently, these properties only end up being useful when the data type has a small number of inhabitants.
functorProps :: (Functor f, Eq1 f, Show1 f, Arbitrary1 f) => Proxy f -> [(String, Property)] Source #
applicativeProps :: (Applicative f, Eq1 f, Show1 f, Arbitrary1 f) => Proxy f -> [(String, Property)] Source #