title: Allowing only different 'any' types in Haskell
body: <p>Say we have a function with signature</p>
  <pre><code>foo :: a -&gt; b -&gt; Int
  </code></pre>
  <p>Is it possible to enforce a constraint ensuring that <strong>a</strong> and <strong>b</strong> are different? That is</p>
  <pre><code>foo :: Int -&gt; String -&gt; Int -- ok
  foo :: Int -&gt; Int    -&gt; Int -- not ok
  </code></pre>
  <p>The purpose of this question is to learn more about Haskell and perhaps solve a design issue I'm facing. My particular case does not make sense if a == b, so I'd like to disallow that at the compiler level. I probably could make this issue go away with a different design altogether but that's besides the point now - the Pandoras box has been opened and I'd like to learn if an equality constraint on the type level is possible.</p>