[Haskell-cafe] Re: Generating repeatable arbitrary values with QuickCheck 2

Ryan Ingram ryani.spam at gmail.com
Tue Feb 2 17:04:13 EST 2010


On Tue, Feb 2, 2010 at 11:25 AM, David Menendez <dave at zednenem.com> wrote:
> We could avoid that problem by redefining Gen as a state transformer monad.
>
> newtype Gen a = MkGen { unGen :: StdGen -> Int -> (a, StdGen) }

Unfortunately, this makes things like
>  infinite_xs <- sequence (repeat arbitrary)
no longer work, since the state never comes out the other side.

Which is a pretty significant change.

  -- ryan


More information about the Haskell-Cafe mailing list