title: Haskell way to go about enums
body: <p>I want to represent a type of the following form :</p>
  
  <pre><code>(Card, Suit)
  </code></pre>
  
  <p>to represent cards in a card game where <code>Card</code> instances would be in the set:</p>
  
  <pre><code>{2, 3, 4, 5, 6, 7, 8, 9, J, Q, K, 1}
  </code></pre>
  
  <p>and <code>Suit</code> would have instances in the set:</p>
  
  <pre><code>{S, D, H, C}
  </code></pre>
  
  <p>I'd handle that with two Data declarations if that wasn't for the numbers:</p>
  
  <pre><code>data Suit = S | D | H | C deri...
  </code></pre>
  
  <p>but obviously adding numbers to those null arity types will fail.</p>
  
  <p>So my question is, how to simulate the kind of enum you find in C?</p>
  
  <p>I guess I'm misundestanding a basic point of the type system and help will be appreciated!</p>
  
  <p>EDIT: I'll add some context: I want to represent the data contained in <a href="http://projecteuler.net/problem=54" rel="nofollow noreferrer">this Euler problem</a>, as you can check, the data is represented in the form of 1S for an ace of spade, 2D for a 2 of diamond, etc...</p>
  
  <p>What I'd really like is to be able to perform a read operation directly on the string to obtain the corresponding object.</p>