title: How to configure QuickCheck with cabal?
body: <p>I'm learning to build a Haskell package. One thing I'm stuck with is running tests with QuickCheck.</p>
  <p>Specifically, how can I configure the number of trials to run?</p>
  <p>Here is my test file (<code>Test.hs</code>) with a dummy test:</p>
  <pre class="lang-hs prettyprint-override"><code>module Main where
  
  import System.Exit (exitFailure)
  import Test.QuickCheck
  
  prop_PermInvariant xs = length xs == length (reverse xs)
    where types = xs :: [Int]
  
  main :: IO ()
  main = quickCheck prop_PermInvariant
  
  </code></pre>
  <p>And here is my <code>.cabal</code> file:</p>
  <pre><code>Test-Suite tests
    type: exitcode-stdio-1.0
    main-is: Test.hs
    default-language: Haskell2010
    build-depends:
      base ^&gt;= 4.14.3.0,
      QuickCheck &gt; 2.14,
    hs-source-dirs: tests
  </code></pre>
  <p>After building the package, I can do <code>cabal test</code>, which will run 100 trials on my dummy test. But how to change that to run 10000?</p>