title: Quickcheck: generate a string made of chars from a given pool
body: <pre><code>propertyForStringsFromMyCharPool :: String -&gt; Bool
  -- implementation
  
  main = T.quickCheck propertyForStringsFromMyCharPool
  </code></pre>
  
  <p>Right now QuickCheck generates all kinds of strings, but I want to test my property only for strings from my pool of characters.</p>
  
  <p>My output now is:</p>
  
  <pre><code>*** Failed! Falsifiable (after 3 tests and 2 shrinks):    
  "-"
  </code></pre>
  
  <p>But it is not a real failure because <code>-</code> is not included in my charset and no string containing it should have been generated in the first place.</p>
  
  <hr>
  
  <ul>
  <li><p>I have tried to read the read <a href="https://hackage.haskell.org/package/QuickCheck-2.8.2/docs/Test-QuickCheck-Arbitrary.html" rel="nofollow noreferrer">the docs of  QuickCheck</a> but they are very abstract and hard, I did not find a sloution.</p></li>
  <li><p>I have seen <a href="https://stackoverflow.com/questions/20934506/haskell-quickcheck-how-to-generate-only-printable-strings">a solution on StackOverflow</a> but it seems so much code for what looks like an easy problem, that I fear it is over-engineered.</p></li>
  </ul>