Tests the following properties:
- Partial Isomorphism
fromList . toList ≡ id- Length Preservation
fromList xs ≡ fromListN (length xs) xs
Note: This property test is only available when
using base-4.7 or newer.
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulequickcheck-classes-base-0.6.2.0Haskell2010
This module provides property tests for functions that operate on
list-like data types. If your data type is fully polymorphic in its
element type, is it recommended that you use foldableLaws and
traversableLaws from Test.QuickCheck.Classes. However, if your
list-like data type is either monomorphic in its element type
(like Text or ByteString) or if it requires a typeclass
constraint on its element (like Data.Vector.Unboxed), the properties
provided here can be helpful for testing that your functions have
the expected behavior. All properties in this module require your data
type to have an IsList instance.
Tests the following properties:
fromList . toList ≡ id
fromList xs ≡ fromListN (length xs) xs
Note: This property test is only available when
using base-4.7 or newer.
imapMProp generateProp Property for the generate function, which builds a container
of a given length by applying a function to each index.
filterProp Property for the filter function, which keeps elements for which
the predicate holds true.
filterMProp Property for the filterM function, which keeps elements for which
the predicate holds true in an applicative context.
mapMaybeProp Property for the mapMaybe function, which keeps elements for which
the predicate holds true.