Standard test spec for properties of Functor instances for values generated with GenValid instances
Example usage:
functorSpecOnArbitrary @[]:: a typeCtrl KGHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 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"