[Haskell-cafe] More QuickCheck Questions

Alexander Solla alex.solla at gmail.com
Tue Jul 26 00:50:15 CEST 2011


On Mon, Jul 25, 2011 at 3:01 AM, Mark Spezzano <mark.spezzano at chariot.net.au
> wrote:

>
> Also, I think that class CoArbitrary can help to generate random *functions
> *(as opposed to values; but tell me if I'm wrong) but I don't see how this
> could be useful.
>

How would you test that a function with the type

endo :: Functor f => (a -> a) -> f a -> f a

satisfies some property?  You pass in "random" functions which satisfy
"some" property, and pass in "random" (f a)'s to try it on.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110725/6159d0a4/attachment.htm>


More information about the Haskell-Cafe mailing list