[Haskell-cafe] Bug with QuickCheck 1.1 and GHC 6.8.2
Jed Brown
jed at 59A2.org
Thu Aug 14 08:47:27 EDT 2008
On Wed 2008-08-13 16:58, Patrick Perry wrote:
> variant :: Int -> Gen a -> Gen a
> variant v (Gen m) = Gen (\n r -> m n (rands r !! v'))
> where
> v' = abs (v+1) `mod` 10000
> rands r0 = r1 : rands r2 where (r1, r2) = split r0
This sort of defeats the purpose of variant since it is now a nearly
random sampling in the predefined range.
I filed a bug report (http://hackage.haskell.org/trac/ghc/ticket/2065)
but it was closed since it works with QC-2. However, most people don't
seem to use QC-2 so it still seems relevant to me.
Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080814/07c38f1f/attachment.bin
More information about the Haskell-Cafe
mailing list