Standard test spec for properties of Functor instances for values generated with GenValid instances
Example usage:
functorSpecOnArbitrary @[]:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11
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"