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

Attachment: pgpvZtYCUx0hX.pgp
Description: PGP signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to