[Haskell-cafe] QC 2.0 missing some stuff I need

Max Bolingbroke batterseapower at hotmail.com
Wed Mar 11 11:19:41 EDT 2009

Hi John,

I also had this problem when adding a QuickCheck 2 provider to
test-framework (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/test-framework-quickcheck2).
In the end I had to copy considerable portions of the QuickCheck2 code
into the provider because there seems to be no pure interface at all
:-(. This is especially important for test-framework because it may
use threading to run several tests simultaneously, and you don't
really want output from multiple tests interleaved on the console.

Actually, despite copying a large chunk of QC2 into the provider I
/still/ didn't entirely stop it from writing to the console, so failed
QC2 properties running under test-framework write the arguments to the
properties that demonstrate failure BEFORE the message telling you the
property has failed! Upsetting, but I had to draw the line at copying
code somewhere.


2009/3/11 John Goerzen <jgoerzen at complete.org>:
> Hi,
> QuickCheck 1.x had this function:
> evaluate :: Testable a => a -> Gen Result
> which I used in TestPack to help wrap a QuickCheck test as a HUnit
> test case.  QuickCheck 2.x seems to have no pure evaluate-like
> function at all; all of its functions are in the IO monad and also
> write their result to stdout, according to the docs.  Am I missing
> something?
> Thanks,
> -- John
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list