title: Using FSCheck generators
body: <p>I have a function to generate doubles in a range:</p>
  
  <pre><code>let gen_doublein = 
      fun mx mn -&gt; Arb.generate&lt;float&gt; |&gt; Gen.suchThat ( (&gt;) mx ) |&gt; Gen.suchThat ( (&lt;) mn )
  </code></pre>
  
  <p>and then a function to generate an array of 2 of these:</p>
  
  <pre><code>let gen_params:Gen&lt;double array&gt; = 
      gen { let! x = gen_doublein 0.0 20000.0
            let! y = gen_doublein 0.0 2000.0
            return [| x;y|] }
  </code></pre>
  
  <p>I put:</p>
  
  <pre><code>static member arb_params = Arb.fromGen  gen_params
  </code></pre>
  
  <p>in the Generator class and register it. All seems OK. To test that this is all OK I have:</p>
  
  <pre><code>let f2 (xs:double array) :double= exp (-2.0*xs.[0]) + xs.[1]*exp (-2.0*xs.[0])
  let fcheck fn xs = fn xs &gt; 0.0
  </code></pre>
  
  <p>then using an array generator 'arrayOfLength':</p>
  
  <pre><code>Check.Quick (Prop.forAll (arrayOfLength 2) (fcheck f2))
  </code></pre>
  
  <p>works as expected, however:</p>
  
  <pre><code>Check.Quick (Prop.forAll (Generators.arb_params) (fcheck f2))
  </code></pre>
  
  <p>just starts doing some calculation and never comes back. f# gurus please help.</p>