title: How can I create a list of objects of different type in Haskell?
body: <p>I have these two Haskell data types:</p>
  
  <pre><code>data Code 
      = Code_A | Code_B | Code C
      deriving (Eq,Show)
  
  data ListObject = Code | Int
  </code></pre>
  
  <p>I need to make a list that contains <code>ListObjects</code>. That is both integer values and codes <code>([1,2, Code_A, 3])</code>. I know it should be possible but I just can't figure the syntax for it. Haskell can do some neat stuff but its syntax sucks. Some help would be greatly appreciated.</p>