Standard test spec for properties of Functor instances for values generated with GenValid instances
Example usage:
functorSpecOnArbitrary @[]:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulegenvalidity-hspec-1.0.0.4Haskell2010
Functor properties
You will need TypeApplications to use these.
Standard test spec for properties of Functor instances for values generated with GenValid instances
Example usage:
functorSpecOnArbitrary @[]functorSpecOnArbitrary :: (Eq (f Int), Show (f Int), Functor f, Typeable f, Arbitrary (f Int)) => SpecStandard test spec for properties of Functor instances for values generated with Arbitrary instances
Example usage:
functorSpecOnArbitrary @[]Standard test spec for properties of Functor instances for values generated by given generators (and names for those generator).
Example usage:
functorSpecOnGens
@[]
@Int
(pure 4) "four"
(genListOf $ pure 5) "list of fives"
((+) <$> genValid) "additions"
((*) <$> genValid) "multiplications"