title: Enforce type difference
body: <p>In Scala I can enforce type equality at compile time. For example:</p>
  
  <pre><code>case class Foo[A,B]( a: A, b: B )( implicit ev: A =:= B )
  
  scala&gt; Foo( 1, 2 )
  res3: Foo[Int,Int] = Foo(1,2)
  
  scala&gt; Foo( 1, "2" )
  &lt;console&gt;:10: error: Cannot prove that Int =:= java.lang.String.
  </code></pre>
  
  <p>Is there a way to enforce that type A and type B should be different ?</p>