-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | QuickCheck common typeclasses
--   
--   This library provides QuickCheck properties to ensure that typeclass
--   instances adhere to the set of laws that they are supposed to. There
--   are other libraries that do similar things, such as
--   `genvalidity-hspec` and <a>checkers</a>. This library differs from
--   other solutions by not introducing any new typeclasses that the user
--   needs to learn.
--   
--   <i>Note:</i> on GHC &lt; 8.5, this library uses the higher-kinded
--   typeclasses (<a>Data.Functor.Classes.Show1</a>,
--   <a>Data.Functor.Classes.Eq1</a>, <a>Data.Functor.Classes.Ord1</a>,
--   etc.), but on GHC &gt;= 8.5, it uses `-XQuantifiedConstraints` to
--   express these constraints more cleanly.
@package quickcheck-classes
@version 0.6.5.0

module Test.QuickCheck.Classes.IsList
mapProp :: (IsList c, IsList d, Eq d, Show d, Show b, Item c ~ a, Item d ~ b, Arbitrary c, Arbitrary b, Show c, Show a, CoArbitrary a, Function a) => Proxy a -> Proxy b -> ((a -> b) -> c -> d) -> Property
isListLaws :: (IsList a, Show a, Show (Item a), Arbitrary a, Arbitrary (Item a), Eq a) => Proxy a -> Laws
foldrProp :: (IsList c, Item c ~ a, Arbitrary c, Show c, Show a, CoArbitrary a, Function a) => Proxy a -> (forall b. () => (a -> b -> b) -> b -> c -> b) -> Property
foldlProp :: (IsList c, Item c ~ a, Arbitrary c, Show c, Show a, CoArbitrary a, Function a) => Proxy a -> (forall b. () => (b -> a -> b) -> b -> c -> b) -> Property
foldlMProp :: (IsList c, Item c ~ a, Arbitrary c, Show c, Show a, CoArbitrary a, Function a) => Proxy a -> (forall s b. () => (b -> a -> ST s b) -> b -> c -> ST s b) -> Property
imapProp :: (IsList c, IsList d, Eq d, Show d, Show b, Item c ~ a, Item d ~ b, Arbitrary c, Arbitrary b, Show c, Show a, CoArbitrary a, Function a) => Proxy a -> Proxy b -> ((Int -> a -> b) -> c -> d) -> Property
imapMProp :: (IsList c, IsList d, Eq d, Show d, Show b, Item c ~ a, Item d ~ b, Arbitrary c, Arbitrary b, Show c, Show a, CoArbitrary a, Function a) => Proxy a -> Proxy b -> (forall s. () => (Int -> a -> ST s b) -> c -> ST s d) -> Property
traverseProp :: (IsList c, IsList d, Eq d, Show d, Show b, Item c ~ a, Item d ~ b, Arbitrary c, Arbitrary b, Show c, Show a, CoArbitrary a, Function a) => Proxy a -> Proxy b -> (forall s. () => (a -> ST s b) -> c -> ST s d) -> Property
generateProp :: (Item c ~ a, Eq c, Show c, IsList c, Arbitrary a, Show a) => Proxy a -> (Int -> (Int -> a) -> c) -> Property
generateMProp :: (Item c ~ a, Eq c, Show c, IsList c, Arbitrary a, Show a) => Proxy a -> (forall s. () => Int -> (Int -> ST s a) -> ST s c) -> Property
replicateProp :: (Item c ~ a, Eq c, Show c, IsList c, Arbitrary a, Show a) => Proxy a -> (Int -> a -> c) -> Property
replicateMProp :: (Item c ~ a, Eq c, Show c, IsList c, Arbitrary a, Show a) => Proxy a -> (forall s. () => Int -> ST s a -> ST s c) -> Property
filterProp :: (IsList c, Item c ~ a, Arbitrary c, Show c, Show a, Eq c, CoArbitrary a, Function a) => Proxy a -> ((a -> Bool) -> c -> c) -> Property
filterMProp :: (IsList c, Item c ~ a, Arbitrary c, Show c, Show a, Eq c, CoArbitrary a, Function a) => Proxy a -> (forall s. () => (a -> ST s Bool) -> c -> ST s c) -> Property
mapMaybeProp :: (IsList c, Item c ~ a, Item d ~ b, Eq d, IsList d, Arbitrary b, Show d, Show b, Arbitrary c, Show c, Show a, Eq c, CoArbitrary a, Function a) => Proxy a -> Proxy b -> ((a -> Maybe b) -> c -> d) -> Property
mapMaybeMProp :: (IsList c, IsList d, Eq d, Show d, Show b, Item c ~ a, Item d ~ b, Arbitrary c, Arbitrary b, Show c, Show a, CoArbitrary a, Function a) => Proxy a -> Proxy b -> (forall s. () => (a -> ST s (Maybe b)) -> c -> ST s d) -> Property


-- | This library provides sets of properties that should hold for common
--   typeclasses.
--   
--   <i>Note:</i> on GHC &lt; 8.6, this library uses the higher-kinded
--   typeclasses (<a>Show1</a>, <a>Eq1</a>, <a>Ord1</a>, etc.), but on GHC
--   &gt;= 8.6, it uses <tt>-XQuantifiedConstraints</tt> to express these
--   constraints more cleanly.
module Test.QuickCheck.Classes
lawsCheck :: Laws -> IO ()
lawsCheckMany :: [(String, [Laws])] -> IO ()
lawsCheckOne :: Proxy a -> [Proxy a -> Laws] -> IO ()
bitsLaws :: (FiniteBits a, Arbitrary a, Show a) => Proxy a -> Laws
eqLaws :: (Eq a, Arbitrary a, Show a) => Proxy a -> Laws
substitutiveEqLaws :: (Eq a, Arbitrary a, CoArbitrary a, Function a, Show a) => Proxy a -> Laws
numLaws :: (Num a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
integralLaws :: (Integral a, Arbitrary a, Show a) => Proxy a -> Laws
ixLaws :: (Ix a, Arbitrary a, Show a) => Proxy a -> Laws
isListLaws :: (IsList a, Show a, Show (Item a), Arbitrary a, Arbitrary (Item a), Eq a) => Proxy a -> Laws

-- | Tests the following properties:
--   
--   <ul>
--   <li><i><i>Partial Isomorphism</i></i> <tt>decode . encode ≡
--   Just</tt></li>
--   <li><i><i>Encoding Equals Value</i></i> <tt>decode . encode ≡ Just .
--   toJSON</tt></li>
--   </ul>
--   
--   Note that in the second property, the type of decode is <tt>ByteString
--   -&gt; Value</tt>, not <tt>ByteString -&gt; a</tt>
jsonLaws :: (ToJSON a, FromJSON a, Show a, Arbitrary a, Eq a) => Proxy a -> Laws
monoidLaws :: (Monoid a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
commutativeMonoidLaws :: (Monoid a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
semigroupMonoidLaws :: (Semigroup a, Monoid a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
ordLaws :: (Ord a, Arbitrary a, Show a) => Proxy a -> Laws
enumLaws :: (Enum a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
boundedEnumLaws :: (Enum a, Bounded a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws

-- | Test that a <a>Prim</a> instance obey the several laws.
primLaws :: (Prim a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
semigroupLaws :: (Semigroup a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
commutativeSemigroupLaws :: (Semigroup a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
exponentialSemigroupLaws :: (Semigroup a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
idempotentSemigroupLaws :: (Semigroup a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
rectangularBandSemigroupLaws :: (Semigroup a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws

-- | Tests the following properties:
--   
--   <ul>
--   <li><i><i>Additive Commutativity</i></i> <tt>a + b ≡ b + a</tt></li>
--   <li><i><i>Additive Left Identity</i></i> <tt>0 + a ≡ a</tt></li>
--   <li><i><i>Additive Right Identity</i></i> <tt>a + 0 ≡ a</tt></li>
--   <li><i><i>Multiplicative Associativity</i></i> <tt>a * (b * c) ≡ (a *
--   b) * c</tt></li>
--   <li><i><i>Multiplicative Left Identity</i></i> <tt>1 * a ≡ a</tt></li>
--   <li><i><i>Multiplicative Right Identity</i></i> <tt>a * 1 ≡
--   a</tt></li>
--   <li><i><i>Multiplication Left Distributes Over Addition</i></i> <tt>a
--   * (b + c) ≡ (a * b) + (a * c)</tt></li>
--   <li><i><i>Multiplication Right Distributes Over Addition</i></i>
--   <tt>(a + b) * c ≡ (a * c) + (b * c)</tt></li>
--   <li><i><i>Multiplicative Left Annihilation</i></i> <tt>0 * a ≡
--   0</tt></li>
--   <li><i><i>Multiplicative Right Annihilation</i></i> <tt>a * 0 ≡
--   0</tt></li>
--   </ul>
--   
--   Also tests that <a>fromNatural</a> is a homomorphism of semirings:
--   
--   <ul>
--   <li><i><i>FromNatural Maps Zero</i></i> <a>fromNatural</a> 0 =
--   <a>zero</a></li>
--   <li><i><i>FromNatural Maps One</i></i> <a>fromNatural</a> 1 =
--   <a>one</a></li>
--   <li><i><i>FromNatural Maps Plus</i></i> <a>fromNatural</a> (<tt>a</tt>
--   + <tt>b</tt>) = <a>fromNatural</a> <tt>a</tt> + <a>fromNatural</a>
--   <tt>b</tt></li>
--   <li><i><i>FromNatural Maps Times</i></i> <a>fromNatural</a>
--   (<tt>a</tt> * <tt>b</tt>) = <a>fromNatural</a> <tt>a</tt> *
--   <a>fromNatural</a> <tt>b</tt></li>
--   </ul>
semiringLaws :: (Semiring a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws

-- | Tests the following properties:
--   
--   <ul>
--   <li><i><i>Additive Inverse</i></i> <tt><a>negate</a> a <a>+</a> a ≡
--   0</tt></li>
--   </ul>
--   
--   Note that this does not test any of the laws tested by
--   <a>semiringLaws</a>.
ringLaws :: (Ring a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws

-- | Test that a <a>GcdDomain</a> instance obey several laws.
--   
--   Check that <a>divide</a> is an inverse of times:
--   
--   <ul>
--   <li><tt>y /= 0 =&gt; (x * y) `divide` y == Just x</tt>,</li>
--   <li><tt>y /= 0, x `divide` y == Just z =&gt; x == z * y</tt>.</li>
--   </ul>
--   
--   Check that <a>gcd</a> is a common divisor and is a multiple of any
--   common divisor:
--   
--   <ul>
--   <li><tt>x /= 0, y /= 0 =&gt; isJust (x `divide` gcd x y) &amp;&amp;
--   isJust (y `divide` gcd x y)</tt>,</li>
--   <li><tt>z /= 0 =&gt; isJust (gcd (x * z) (y * z) `divide`
--   z)</tt>.</li>
--   </ul>
--   
--   Check that <a>lcm</a> is a common multiple and is a factor of any
--   common multiple:
--   
--   <ul>
--   <li><tt>x /= 0, y /= 0 =&gt; isJust (lcm x y `divide` x) &amp;&amp;
--   isJust (lcm x y `divide` y)</tt>,</li>
--   <li><tt>x /= 0, y /= 0, isJust (z `divide` x), isJust (z `divide` y)
--   =&gt; isJust (z `divide` lcm x y)</tt>.</li>
--   </ul>
--   
--   Check that <a>gcd</a> of <a>coprime</a> numbers is a unit of the
--   semiring (has an inverse):
--   
--   <ul>
--   <li><tt>y /= 0, coprime x y =&gt; isJust (1 `divide` gcd x
--   y)</tt>.</li>
--   </ul>
gcdDomainLaws :: (Eq a, GcdDomain a, Arbitrary a, Show a) => Proxy a -> Laws

-- | Test that a <a>Euclidean</a> instance obey laws of a Euclidean domain.
--   
--   <ul>
--   <li><tt>y /= 0, r == x `rem` y =&gt; r == 0 || degree r &lt; degree
--   y</tt>,</li>
--   <li><tt>y /= 0, (q, r) == x `quotRem` y =&gt; x == q * y +
--   r</tt>,</li>
--   <li><tt>y /= 0 =&gt; x `quot` x y == fst (x `quotRem` y)</tt>,</li>
--   <li><tt>y /= 0 =&gt; x `rem` x y == snd (x `quotRem` y)</tt>.</li>
--   </ul>
euclideanLaws :: (Eq a, Euclidean a, Arbitrary a, Show a) => Proxy a -> Laws
showLaws :: (Show a, Arbitrary a) => Proxy a -> Laws
showReadLaws :: (Show a, Read a, Eq a, Arbitrary a) => Proxy a -> Laws
storableLaws :: (Storable a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws
genericLaws :: (Generic a, Eq a, Arbitrary a, Show a, Show (Rep a ()), Arbitrary (Rep a ()), Eq (Rep a ())) => Proxy a -> Laws
generic1Laws :: forall (f :: Type -> Type) proxy. (Generic1 f, Eq1 f, Arbitrary1 f, Show1 f, Eq1 (Rep1 f), Show1 (Rep1 f), Arbitrary1 (Rep1 f)) => proxy f -> Laws
alternativeLaws :: forall (f :: Type -> Type) proxy. (Alternative f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws

-- | Tests the following alt properties:
--   
--   <ul>
--   <li><i><i>Associativity</i></i> <tt>(a <a>&lt;!&gt;</a> b)
--   <a>&lt;!&gt;</a> c ≡ a <a>&lt;!&gt;</a> (b <a>&lt;!&gt;</a>
--   c)</tt></li>
--   <li><i><i>Left Distributivity</i></i> <tt>f <a>&lt;$&gt;</a> (a
--   <a>&lt;!&gt;</a> b) ≡ (f <a>&lt;$&gt;</a> a) <a>&lt;!&gt;</a> (f
--   <a>&lt;$&gt;</a> b)</tt></li>
--   </ul>
altLaws :: forall proxy (f :: Type -> Type). (Alt f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws

-- | Tests the following alt properties:
--   
--   <ul>
--   <li><i><i>LiftF2 (1)</i></i> <tt>(<a>&lt;.&gt;</a>) ≡ <a>liftF2</a>
--   <a>id</a></tt></li>
--   <li><i><i>Associativity</i></i> <tt><a>fmap</a> (<a>.</a>) u
--   <a>&lt;.&gt;</a> v <a>&lt;.&gt;</a> w ≡ u <a>&lt;.&gt;</a> (v
--   <a>&lt;.&gt;</a> w)</tt></li>
--   </ul>
applyLaws :: forall (f :: Type -> Type) proxy. (Apply f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
applicativeLaws :: forall (f :: Type -> Type) proxy. (Applicative f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
contravariantLaws :: forall (f :: Type -> Type) proxy. (Contravariant f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
foldableLaws :: forall proxy (f :: Type -> Type). (Foldable f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
functorLaws :: forall (f :: Type -> Type) proxy. (Functor f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
monadLaws :: forall (f :: Type -> Type) proxy. (Monad f, Applicative f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
monadPlusLaws :: forall (f :: Type -> Type) proxy. (MonadPlus f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
monadZipLaws :: forall (f :: Type -> Type) proxy. (MonadZip f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws

-- | Tests the following alt properties:
--   
--   <ul>
--   <li><i><i>Left Identity</i></i> <tt><a>zero</a> <a>&lt;!&gt;</a> m ≡
--   m</tt></li>
--   <li><i><i>Right Identity</i></i> <tt>m <a>&lt;!&gt;</a> <a>zero</a> ≡
--   m</tt></li>
--   </ul>
plusLaws :: forall proxy (f :: Type -> Type). (Plus f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws

-- | Tests everything from <tt>altLaws</tt>, plus the following:
--   
--   <ul>
--   <li><i><i>Congruency</i></i> <tt><a>zero</a> ≡ <a>empty</a></tt></li>
--   </ul>
extendedPlusLaws :: forall proxy (f :: Type -> Type). (Plus f, Alternative f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
traversableLaws :: forall (f :: Type -> Type) proxy. (Traversable f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. Arbitrary a => Arbitrary (f a)) => proxy f -> Laws
bifoldableLaws :: forall proxy (f :: Type -> Type -> Type). (Bifoldable f, forall a b. (Eq a, Eq b) => Eq (f a b), forall a b. (Show a, Show b) => Show (f a b), forall a b. (Arbitrary a, Arbitrary b) => Arbitrary (f a b)) => proxy f -> Laws
bifunctorLaws :: forall proxy (f :: Type -> Type -> Type). (Bifunctor f, forall a b. (Eq a, Eq b) => Eq (f a b), forall a b. (Show a, Show b) => Show (f a b), forall a b. (Arbitrary a, Arbitrary b) => Arbitrary (f a b)) => proxy f -> Laws
bitraversableLaws :: forall proxy (f :: Type -> Type -> Type). (Bitraversable f, forall a b. (Eq a, Eq b) => Eq (f a b), forall a b. (Show a, Show b) => Show (f a b), forall a b. (Arbitrary a, Arbitrary b) => Arbitrary (f a b)) => proxy f -> Laws
categoryLaws :: forall proxy (c :: Type -> Type -> Type). (Category c, forall a b. (Eq a, Eq b) => Eq (c a b), forall a b. (Show a, Show b) => Show (c a b), forall a b. (Arbitrary a, Arbitrary b) => Arbitrary (c a b)) => proxy c -> Laws
commutativeCategoryLaws :: forall proxy (c :: Type -> Type -> Type). (Category c, forall a b. (Eq a, Eq b) => Eq (c a b), forall a b. (Show a, Show b) => Show (c a b), forall a b. (Arbitrary a, Arbitrary b) => Arbitrary (c a b)) => proxy c -> Laws

-- | Tests the following <a>Semigroupoid</a> properties:
--   
--   <ul>
--   <li><i><i>Associativity</i></i> <tt>f `<tt>o'</tt> (g `<tt>o'</tt> h)
--   ≡ (f `<tt>o'</tt> g) `<tt>o'</tt> h</tt></li>
--   </ul>
--   
--   <i>Note</i>: This property test is only available when this package is
--   built with <tt>base-4.9+</tt> or <tt>transformers-0.5+</tt>.
semigroupoidLaws :: forall proxy (s :: Type -> Type -> Type). (Semigroupoid s, forall a b. (Eq a, Eq b) => Eq (s a b), forall a b. (Show a, Show b) => Show (s a b), forall a b. (Arbitrary a, Arbitrary b) => Arbitrary (s a b)) => proxy s -> Laws

-- | Tests everything from <a>semigroupoidLaws</a> plus the following:
--   
--   <ul>
--   <li><i><i>Commutative</i></i> <tt>f `<tt>o'</tt> g ≡ g `<tt>o'</tt>
--   f</tt></li>
--   </ul>
--   
--   <i>Note</i>: This property test is only available when this package is
--   built with <tt>base-4.9+</tt> or <tt>transformers-0.5+</tt>.
commutativeSemigroupoidLaws :: forall proxy (s :: Type -> Type -> Type). (Semigroupoid s, forall a b. (Eq a, Eq b) => Eq (s a b), forall a b. (Show a, Show b) => Show (s a b), forall a b. (Arbitrary a, Arbitrary b) => Arbitrary (s a b)) => proxy s -> Laws

-- | Test that a <a>MVector</a> instance obey several laws.
muvectorLaws :: (Eq a, Unbox a, Arbitrary a, Show a) => Proxy a -> Laws
data Laws
Laws :: String -> [(String, Property)] -> Laws
[lawsTypeclass] :: Laws -> String
[lawsProperties] :: Laws -> [(String, Property)]
data Proxy1 (f :: Type -> Type)
Proxy1 :: Proxy1 (f :: Type -> Type)
data Proxy2 (f :: Type -> Type -> Type)
Proxy2 :: Proxy2 (f :: Type -> Type -> Type)
