| Subject: | Re: [Haskell-cafe] Re: Generating repeatable arbitrary values with QuickCheck 2 |
|---|---|
| From: | Ryan Ingram |
| Date: | Tue, 2 Feb 2010 14:04:13 -0800 |
On Tue, Feb 2, 2010 at 11:25 AM, David Menendez <dave@xxxxxxxxxxxx> 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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Haskell-cafe] Game of life in haskell., edgar |
|---|---|
| Next by Date: | Re: [Haskell-cafe] Anyone up for Google SoC 2010?, Neil Mitchell |
| Previous by Thread: | Re: [Haskell-cafe] Re: Generating repeatable arbitrary values with QuickCheck 2, Sean Leather |
| Next by Thread: | Re: [Haskell-cafe] Re: Generating repeatable arbitrary values with QuickCheck 2, Ryan Ingram |
| Indexes: | [Date] [Thread] [Top] [All Lists] |