| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.QuickCheck.Classes.FoldableOrd
Contents
Documentation
foldableLaws :: forall proxy f. (Foldable f, forall a. Show a => Show (f a), forall a. (Arbitrary a, Ord a) => Arbitrary (f a)) => proxy f -> Laws Source #
Tests the following Foldable properties:
- fold
fold≡foldMapid- foldMap
foldMapf ≡foldr(mappend. f)mempty- foldr
foldrf z t ≡appEndo(foldMap(Endo. f) t ) z- foldr'
foldr'f z0 xs ≡ let f' k x z = k$!f x z infoldlf'idxs z0- foldr1
foldr1f t ≡ letJust(xs,x) =unsnoc(toListt) infoldrf x xs- foldl
foldlf z t ≡appEndo(getDual(foldMap(Dual.Endo.flipf) t)) z- foldl'
foldl'f z0 xs ≡ let f' x k z = k$!f z x infoldrf'idxs z0- foldl1
foldl1f t ≡ let x : xs =toListt infoldlf x xs- toList
toList≡foldr(:) []- null
null≡foldr(const(constFalse))True- length
length≡getSum.foldMap(const(Sum1))
Note that this checks to ensure that foldl' and foldr'
are suitably strict.
Orphan instances
| Ord (Bottom Integer) Source # | |
Methods compare :: Bottom Integer -> Bottom Integer -> Ordering Source # (<) :: Bottom Integer -> Bottom Integer -> Bool Source # (<=) :: Bottom Integer -> Bottom Integer -> Bool Source # (>) :: Bottom Integer -> Bottom Integer -> Bool Source # (>=) :: Bottom Integer -> Bottom Integer -> Bool Source # max :: Bottom Integer -> Bottom Integer -> Bottom Integer Source # min :: Bottom Integer -> Bottom Integer -> Bottom Integer Source # | |
| Ord (VerySmallList Integer) Source # | |
Methods compare :: VerySmallList Integer -> VerySmallList Integer -> Ordering Source # (<) :: VerySmallList Integer -> VerySmallList Integer -> Bool Source # (<=) :: VerySmallList Integer -> VerySmallList Integer -> Bool Source # (>) :: VerySmallList Integer -> VerySmallList Integer -> Bool Source # (>=) :: VerySmallList Integer -> VerySmallList Integer -> Bool Source # max :: VerySmallList Integer -> VerySmallList Integer -> VerySmallList Integer Source # min :: VerySmallList Integer -> VerySmallList Integer -> VerySmallList Integer Source # | |