title: Why can't I provide a type within a typeclass instance?
body: <p>This code works fine as expected:</p>
  
  <pre><code>data Heh a = Heh a
  instance (Eq a) =&gt; Eq (Heh a) where
      (Heh a1) == (Heh a2) = a1 == a2
  </code></pre>
  
  <p>Yet this gives an error:</p>
  
  <pre><code>data Heh a = Heh a
  instance (Eq a) =&gt; Eq (Heh a) where
      (Heh a1) == (Heh a2) = (a1 :: a) == a2
      -- Error: Couldn't match expected type ‘a1’ with actual type ‘a’
      --        ...
  </code></pre>
  
  <p>The only change is adding the <code>:: a</code>.</p>
  
  <p>But why would this fail? Isn't <code>a1</code> indeed <code>a</code>? What else could it possibly be?</p>
  
  <p>How does this relate to <code>forall</code>? I understand Haskell has a <code>forall</code> keyword to deal with this somehow. (By the way, if that won't be possible until GHC 8.0, feel free to let me know how to do it in the upcoming GHC 8.0 then.)</p>