Re: [Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-27 Thread Daniel Kahlenberg
Hello, the final RNG state from the first execution of your code and passing it as the initial state to the second original intention of my question: How can I change the runOneRandom function (with RNG updates) to return [ThingK True...] samples instead of Int? My solution so far: import

[Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Daniel Kahlenberg
Maybe this is a beginners question... But here my problems description: import Random import Control.Monad import qualified Control.Monad.State as S import Test.QuickCheck.Gen import Test.QuickCheck.Arbitrary Each thing can have one of three types: data Ontology = Thing1 Bool

Re: [Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Bryan O'Sullivan
On Tue, Apr 26, 2011 at 3:04 AM, Daniel Kahlenberg d.kahlenb...@googlemail.com wrote: Thought getRandom function would be the best place to inject my unGen function call, but cannot get it to type-check: You haven't described what it is you're actually trying to do, and I'm afraid your code

Re: [Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Bryan O'Sullivan
On Tue, Apr 26, 2011 at 9:16 AM, Daniel Kahlenberg d.kahlenb...@gmail.comwrote: hold on I'd like to have the genArray call generating distinctive results in one IO execution The problem you're seeing is due to the fact that you're not taking the final RNG state from the first execution of