title: Is there a way to use constructors of one type as types too?
body: <p>For example: </p>
  
  <pre><code>data Foo = Bar Int | Baz String
  </code></pre>
  
  <p>I would like to use a function like:</p>
  
  <pre><code>qux :: [Foo] -&gt; [Baz]
  qux fs = filter f fs
      where
          f (Baz _) = True
          f _ = False
  </code></pre>
  
  <p>Normally, i need to:</p>
  
  <pre><code>data Bar = Bar Int
  data Baz = Baz String
  
  data Foo = FBar Bar | FBaz Baz
  
  qux = ...
  </code></pre>
  
  <p>but I'm not happy with this solution, because it needs lots of redundant code. </p>
  
  <p>Is there a elegant way to solve this issue? </p>