[Haskell-cafe] Re: [Haskell] ANN: quickcheck-poly - Automating QuickCheck for polymorphic/overloaded properties in a small world of types

Henning Thielemann lemming at henning-thielemann.de
Sat Oct 24 17:52:35 EDT 2009


On Sat, 24 Oct 2009, Henning Thielemann wrote:

> Maybe you could write a block of quickCheck tests, that shall be run on
> different types.
>
> tests :: a -> IO ()
> tests x =
>   do quickCheck (\y -> law1 (y `asTypeOf x))
>      ...

must be `asTypeOf`

>
> allTests =
>   tests (undefined :: Int)
>   tests (undefined :: Double)
>
>


More information about the Haskell-Cafe mailing list